Getting started with (2D) UI in Unity 3D

Hello,

I have searched the forums for relevant posts but found none.

How good is Unity for 2D UIs and apps compared to pure 2D engines out there?
Is the engine itself capable enough or should I get a 2D tool like NGUI, Orthello 2D,… from the get go?
What are the first steps, documents, tutorials, videos,… you would suggest?

Thanks

You should most likely use a framework. Depending of the target platform, you might choose:

  • for mobile: use frameworks optimized for mobile (NGUI, EzGUI etc.) drawing GUI elements as 3D meshes

  • for all the other platforms: all the above, plus frameworks wrapping up UnityGUI (iGUI, eDriven.Gui etc.) Note: UnityGUI frameworks also work on mobile, and are just fine for menus and stuff. Also, Unity 4 is getting optimized and running UnityGUI up to 10x faster.

Hi,
I heard that 2DToolkit is also very good for GUI stuff and not only sprites animations but I haven’t tested it myself so I’d like someone else to confirm if it works well also on mobile.
The native Unity GUI is ok for buttons and labels etc. but whenever you want to deal with different resolutions or change sprites of one GUI element on the fly through code it gets very annoying. What’s worst is that what you see in the Unity editor game tab is NOT what you’ll see on your mobile phone (if you want to develop for mobile).

2DToolkit and other plugins allow you to easily import spritesheets and define gui elements from those. I never understood if there’s a way to use spritesheets with the standard Unity GUI.

But this is all for GUI stuff, DO NOT use onGUI to animate sprites etc., do that with 2DToolkit or the free version of SpriteManager (but I read that 2DToolkit is much better…but it’s not free).

To animate some GUI elements you can also use the iTween plugin (free) which works great for any kind of animation (also GUI elements but I never tested its performance with GUI, only with meshes).

Isn’t Unity’s GUI 2d only? From what I have seen their GUI doesn’t contain any 3d elements.