Starting out with the a new project
Start the new project by creating a new “3D core” based project. It has to be 3D otherwise there will be some settings which won’t be implemented when Unity compiles the build. Make sure to name the project and save to the desired location within your local storage.
Creating the platforms:
Once Unity finishes loading, we are going create the platforms first using 3D cubes. To create these cubes, simply right click on the hierarchy and under 3D Objects > cube. Since these cubes will have the same components and settings we can create one prefab of the platform first and then duplicate them so they will have an unified setting for all.
Duplicate and rearranged the platforms into an desirable layout that can simulate a game level (similar to Super Mario). To organized all these platforms, create an empty game object and zero out the position. Then drag in all the platforms into the empty game object, this will be your folder for the environment.
Creating the Player:
For now, we are going to represent the player as an capsule. Right click and under 3D Objects, select Capsule.
To make sure that the player is on the correct alignment with the platforms, we have to set the Z position to zero.
Finally before we start scripting for the player, we can set the tag of the game object to “Player” so Unity can identify the object as an playable component.
Finally, to finish off in creating our platformer level, we are going to add in collectables (it can be coins, gems, points etc.) but we are going to conceptualize with spheres first.
Similar to how we have done the platforms, we are going to create an 3D sphere and create a prefab of it by dragging the game object into the prefabs folder.
Then we are going to make sure that the Sphere collider has the “is Trigger” function check on. Then add a Rigidbody component with the “Gravity” setting to check off. This will allow the player to check for collision and be collected, all while having the sphere be unaffected by the gravity.