RSS

Tag Archives: button

Unity3D: How to create a link button, with fun


How to create a link style button in Unity3D? Here the considerations include:

  1. The link button should look like a label, instead of a button
  2. The link button should work like a button, with clickable responses such as navigating to a URL;
  3. When the mouse hovers, the mouse cursor should look like a hand cursor, instead of the arrow cursor.

image

 

Read the rest of this entry »

Advertisements
 
1 Comment

Posted by on January 21, 2015 in Programming, Unity 3d

 

Tags: , , , , , , , , , , ,

Unity3D 4.6 UI: get the button and handle the click event in code


In the new Unity3D UI in v4.6, it is much easier to design fancy UI right within Unity without tertiary tools such as NGUI.

One question frequently met is: how to get access the UI elements such as text, button object in code? Here is the tip:

image

Read the rest of this entry »

 
2 Comments

Posted by on December 12, 2014 in Programming, Unity 3d

 

Tags: , , , , , , , , ,

Unity3D: put 3D objects above GUI surface


The default rendering results for GUI objects such as GUI textures, buttons, labels etc. are that they are overlaied above 3D views.

To do the opposite, for instance, make 3D view overlaied upon GUITextures, one can user layers and multiple cameras to achieve this.

  • Create a GUITexture object: in menu:  GameObject  arrow, dash, right icon  Create Other  arrow, dash, right icon  GUI Texture, let’s name it BackgroundTexture
  • Drop a 3D file, e.g. an obj file to the scene

image

Read the rest of this entry »

 
1 Comment

Posted by on November 5, 2013 in Programming, Unity 3d

 

Tags: , , , , , , , , ,