Our work so far has produced an interesting environment and a controllable character within this environment. Before moving forward, let's turn our attention to optimization—an issue that should be considered early during development. Optimization refers to the tips and tricks that we can apply to improve runtime performance as well as our workflow generally. Here, we'll consider prefabs to improve our workflow and Sprite Packing to improve runtime performance. Let's start with prefabs.
A prefab is a Unity asset that lets you group together many objects in a scene and package them together as a single unit that can be added to the Project panel as an asset. From here, the prefab can be added as a complete unit to any other scene or environment as though it were a separate and complete thing. The player character is an ideal candidate for a prefab because it must feature in all the other scenes we create. Let's create a prefab from the player. To do this, simply drag and drop...