1.
If you know the reason why, Nature knows it.
HUD refers to the head-up display, is set in the face, and your eyes fixed together, the HUD means that the interface, in general, we say that the HUD refers to the 3D space in the interface of some information (such as blood bars, injuries, etc.) on the interface, corresponding to 3D space projection to the location of screen space.
A simple, simple thing is a projection.
Although I have always thought that I learned the wild way, quite in the castle. Unfortunately found that more than my way, more than my base is worse than the students are more heinous.
No way, we use Ugui to realize this projection process.
First, prepare our 3D space.
Make a few boxes to get them to turn.
If even this do not know how to make classmates I advise you still close this page, if really not, or willing to continue to look down, look at the following three pictures.
Then, get a simple Ugui interface.
Get three image and distinguish it from the other.
Then the canvas is going to be placed in screenspace, because we're going to map to screen space, so we just need to map it once.
I like to let him zoom on the screen height, this does not affect the positioning, to see your needs.
Let the image display in the location of the cube
It's that simple, one-time mapping, problem solving.
Problems with sorting
One last question, HUD is that Gui,gui is sorted by GUI rules, but 3D objects are sorted by depth.
Need to make a mapping of the HUD's collation,
We're going to fix the canvas with a sorthud script.
It's good to rearrange the order according to the rules of depth.
Pay SVN address
http://code.taobao.org/svn/fightbeta/trunk/uGUISample/
How to create a HUD with the Unity GUI