Road TO Dev — From Prototype to Assets! Let’s Import!
Ok so now we have the basic functionality of our game let’s change these cubes into wonderful looking game objects! There are several ways you can achieve this in Unity. You can use Import New Asset under the Assets menu from the top, you can right click in the project folder and Import as well, and you can even drag and drop right from your folders into Unity. There are other ways also but these are the ones to import from your Computer.
Alright now let’s make our player look good! Also this is where the game starts to change a bit we have been prototyping in 3D but I am inserting 2D sprites for the game objects there are a few ways to handle this conversion. First you can drag the Sprite onto your hierarchy rename it to Player make sure you set the Tag.
Notice on the sprite renderer there is a sorting layer, you’ll want to create one for your player. With 2D games your sprites stack on the screen and the sorting layers are how you define what is above another object. This way when you add a background it can go behind (below) the player when you set it’s sorting layer to background. You can even change the order of that given layer for example if you have a black background you could make it 0 in the Order in layer and add star effects to the same sorting layer but make it be 1 so it’s in front of the background, but because your player is on a layer already above that those both will be behind the player still.
Now that we have our new player sprite on the scene we need to set it up to be a player. The easiest way is to just drag our player script onto it and set it up with a Box Collider 2D. Now you will need to remember to reassign your prefab and spawn manager to the player in the inspector and resize the Collider to the new sprite plus reset it as a trigger.
Now with that set our new sprite should function completely like our cube except looking more awesome!