From prototype to a work of art

The Unity Engine enables easy prototyping by allowing users to intuitively create low-cost primitives that can be fully powered and detailed by scripts. This is extremely essential during the pre-production stage of a game, which will be explored in the next article. For now, let’s take a look at the process to transition from prototype to actual works of art!
From prototype to 3D art game asset

Since both GameObjects exist in a three-dimensional space, the process needed is minimalistic in nature. The transition from a prototype to a 3D art game asset is as simple as attaching the behavior script and replacing the prototype.
- Thanks to Unity’s drag-and-drop system, you can easily attach the behavior scripts to your new game assets and get the same results you experienced when you programmed the prototypes.

2. Make sure that the necessary components such as a Rigidbody, and Collider, are added to the new asset as well.
Note: You may need to un-tweak “Use Gravity” from your Rigidbody component depending on whether your behavior script makes use of it or not.

Side by Side behavior Comparison

Note: Depending on the complexity of your object, you may need to do some extra fine-tuning, such as adding any pertinent animations. That being said, the code will remain fully functional with little to no alternations.
From prototype to 2D Sprites

When changing from 3D prototypes to 2D Sprites, there is a bit more of a process to follow. Let’s take it step-by-step:
- Change the Scene type to 2D

2. Drag-and-Drop your sprite into the scene, then resize if needed.

3. Add the necessary components making sure they are 2D Components. Make sure to set the Gravity Scale to 0 in the Rigidbody 2D when and if necessary.

4. Just as you added 2D Components, you will need to change the collision code to match the typing. This is essential for the engine to register 2D physics collisions.
From this

To this

With all the changes in place, your sprite should be fully functional and follow the same behavior as your prototype.

Layers when working with 2D sprites
Similar to Photoshop, Clip Art Studio, and other art software, you need to be mindful of the layer placement. Let’s take a look at what happens when you add a background to your game.
- Add a background via drag-and-drop

When you add a background, it will overlap with your other game objects.

There is a simple way to fix this by organizing your layers following the 2D Sorting logic. The way Unity prioritizes Renders is according to a priority order — the lower on the list, the closer to the camera, or the higher up the stack.
- Click on the background and create a layer for it. In my case, I have already created a Background layer, but you can follow along.

2. Create a layer for your sprite in the same manner.
By now, you have two layers. One for everything that needs to be rendered in the background, and one for everything that goes above it. They must be in this respective order.

With all the elements assigned to their respective layers, the overlapping is fixed.

Join me in the next article where we will explore the importance of prototyping in pre-production!