I want my UI to be part of the game’s scene. That’s, the UI components appear to be like inside the game’s environment. For instance, we could imagine having buttons located around a character controller by the player, and the buttons follow the character where ever it moves. The player can click on those buttons around his character any time during the game.
However, the UIs will then need to have some sort of 3D perspective. I tried GUITexture, but it seems to only appear on the most front of the game like a 2D GUI. So I thought I need to transform the UI component to give that sort of 3D perspective.
I thought I could use planes as my UI. I apply the textures on the planes, and change the textures in the different event states. This way, the UI components, which are planes, can be transformed(scale, rotate, etc) within the 3D scene. I can foresee quite a few cons with this method. Simple buttons are easy to do with this method. But I have to code from scratch for components such as a scrolling listbox, dialogue boxes, tabbed window, etc.
So, is my idea of using planes to create my UI for the purpose of having it appear within the 3D game scene a feasible one? Otherwise, what else can I to serve my purpose?
I am very new to Unity and I appreciate any form of suggestions/ideas/methods/plugins/anything.
Thanks.
The only plugin I tried was UIToolkit, its good for what it is (free), but as with what I hear from NGUI, a fair bit of learning just to use them.
Personally, I started by using cubes that were scaled to the image on it. I never used planes as their scaling seems independent to the rest of the world. From here I learned to make my own meshes, starting with a quad (so now I had my own plane that was to scale with the rest of the world). From there I built my own GUI and Text that each work with Texture Packer and bmFont.
It is very rewarding to have made my own, and then when you start to play with animating the vertices and uv’s, things get alot more fun. Moving verts to ‘pop’ buttons open or closed, swapping uv’s for animating textures or visually changing state of button. alpha, its all fun. I only just finished my animated sprite quad, now writing this I think I have to now go and add ‘alpha fade in/out’ to all my quads!