User Interface

From __space Wiki
Revision as of 15:06, 18 May 2017 by Steph (talk | contribs) (Created page with "[http://space.apps.uri.edu/wiki/index.php?title=Learn_Unity_First '''Main guide page'''] =Canvas= This holds all the other User Interface (UI) elements you'll want to use. I...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Main guide page

Canvas

This holds all the other User Interface (UI) elements you'll want to use. If you go to GameObject > UI > and pick anything other than Canvas or Event System, both will be created (unless they already exist). Render Mode is for saying if you want the UI elements to just follow the main camera (the default of Screen Space - Overlay), or remain attached to an object and stay in place no matter where the player is (the World Space option). You can have more than one canvas in a scene, so Sort Order determines which canvas is on the top layer, above any other canvases.

Text

Note: TextMesh Pro's text ui is much more customizeable, and it is a very good and free plugin that is better in most situations, but I'm going to talk about the text ui object that Unity has by default. Even if you do decide to use the plugin for text objects, this section is still relevant. Do try out TextMesh Pro in the asset store though, it's really good!

For text visibility, try not to make the font size too small, and always test that your UI looks right after major changes. Wrapping and truncation can change text, that you think is completely fine, to look a bit different than what you might think it would be.

Images (and Raw Images)

Input

Buttons

Text

Dropdown

Slider

Make sure to take a look at the videos over at Unity's site for more information on UI elements.