Now that we have our background in the world, let's add in our player sprite:
Art Assets
folder included in the example code for the chapter, bring the three sprites for the plane into the Project tab's Assets/Sprites
folder.Assets
folder, create a new folder named Animations.
Animations
folder we just created and then open it. Afterwards, change the File name: property to PlaneFlying
and then press Save. This will create an animation and controller that will automatically play it. We will talk about animations in more detail in the next chapter, but currently, this will always just play an animation using these three frames over and over again unless we stop it via code..5, .5, 1
. Next, we want the plane to be to the left side of the screen while also being seen from each resolution so then the Position to -2.5, 0, 0
. In addition, let's rename the object Plane
.Gameplay
scene in the Scenes
folder and project and then play the game!At this point, the plane animates for us automatically, and it fits in all of our aspect ratios nicely!