Since now Unity3D
GUI system isn't very flexible. The new GUI system is one of the features still not released in Unity 4
(we are all waiting for it).
From my point of view it has several problems, particularly:
- You are forced to layout components using the flow of the code, instead of having a more declarative (or at least a more structured) way to do that.
- It's quite inefficient (at least one draw call for button).
- It isn't flexible at all. Add, Remove, Enable/Disable buttons can be come quick a painful operation when the number of buttons increase.
however, what I want to is sometime render the exact same gui elements, which can be dynamic, and thus not just put into a prefabbed texture, into a trapezoid-shaped area off to the side, looking as if that gui were actually on a flat plane, pushed away from the center of the screen, and rotated slightly. All gui buttons that were drawn in the function should still respond normally.
This is quite hard if not impossible to obtain using Unity
's GUI
classes.
I see 2 possibilities:
- Don't use
GUI
classes to do that. If yourGUI
is simple enough, you can implement your own (even 3d) buttons using for example:- A mesh (a plane or a trapezoid mesh) with a texture for the button background
- TextMesh for drawing 3D text
- RayCasting to check if a button has been pressed
- Use a library that implements a more advanced GUI system like NGUI