Building the scene

Now that we have some assets to build with, we can start building our first town, by placing images within the scene.

Adding the town background

Returning to the scene view, you should see the following:

Adding the town background

If, however, we add our town background texture to the scene by dragging it to either the project Hierarchy or the scene view, you will end up with the following:

Adding the town background

Our player has vanished! The reason for this is simple: Unity's sprite system has an ordering system that comes in two parts.

Sprite sorting layers

Sorting Layers (Edit ...

Get Mastering Unity 2D Game Development - Second Edition 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.