Unity: Creating a nicer background

Objective: We want to make it so that the background of our game isn’t just a black screen to build a bit of an environment to our game.
First, we need to switch our game to a 2D view to help make things look better when setting up our game in the scene view. It’ll be at the top left of the scene view window.

Next, we need to add our background sprite into the hierarchy and adjust the size to match the size of the game. You do this by using the rect tool and pulling the sides and corners to make it bigger or smaller until you have a size you’re happy with.

Once it’s all fit together, we can add our player sprite to the hierarchy so we can see how the game will look. One thing you’ll notice is the player can go behind the background which we don’t want. To fix this you will need to go into the sorting layer under the sprite renderer and we will wan to create a background and foreground layer or change to order of layer to 0 for the background and the player to 1.
