Saturday, July 8, 2017

Static UI

Some basics with using UI in Unity 5.  To get a static (non-interactive) UI element, go to GameObject > UI  and either select Text or Raw Image.


Adding one of these will automatically create a Canvas and an EventSystem.  For static purposes these two game objects can be ignored.  Note that the order at which the child objects appear will dictate what is "in front" of what in the view.  In this case CountBackground is behind the Text.


Final note, if referencing these objects within code make sure you have the header:

using UnityEngine.UI;

No comments:

Post a Comment