Now let's jump into some examples! We'll be creating a layout for a basic heads-up-display (HUD) and a background image that stretches with the screen and scales at multiple resolutions.
Before we begin setting up our UI, let's set up our project and bring in the art assets we will need.
We'll begin by setting up our project:
- Create a new Unity Project and name it Master Unity UI Project. Create it in the 2D mode.
We're selecting 2D Mode because it will make importing our UI sprites a lot easier. When in 2D Mode, all images import as Sprite (2D and UI) images rather than Texture images, as they do in 3D Mode. You can change to 3D Mode at any time by navigating to Edit | Project Settings | Editor and changing Mode to 3D.
- Create three new folders named Scenes, Scripts, and Sprites:
You don't need the Editor folder, but, if you'd...