Placing a background image (2D game)

Placing a background image that scales with the screen is not too difficult as long as you use the appropriate Canvas properties. We will expand upon our HUD example and place a background image in the scene.

We'll need to ensure that this background image doesn't just display behind other UI elements, but also displays behind any game objects we may put in our scene.

To make a background image that displays behind all UI elements as well as all game elements, complete the following steps:

  1. Create a new Canvas using Create | UI | Canvas. I like to use different Canvases to sort my different UI elements, ...

Get Mastering UI Development with Unity now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.