Adding a 3D cube in Unity is a simple and essential task for building scenes and game objects. It's one of the most basic primitive shapes available.
Steps to Add a Cube
Here are the straightforward steps to add a 3D cube to your Unity scene:
- Open Your Project: Ensure your Unity project is open and you are viewing the Unity Editor interface.
- Access the Hierarchy: Locate the Hierarchy window. This window lists all the GameObjects currently in your open scene. It is typically situated on the left side of the Unity Editor layout.
- Right-Click in Hierarchy: Right-click anywhere within the Hierarchy window. This action will bring up a context menu.
- Select 3D Object: In the context menu, hover your mouse cursor over the 3D Object option. This will expand a submenu showing various 3D primitive types and other options.
- Choose Cube: From the 3D Object submenu, select Cube.
Once you select Cube, a new Cube GameObject will be instantly added to your current scene.
Verifying the Added Cube
After following the steps above, you should immediately see the newly added cube:
- In the Hierarchy window: A new item named "Cube" will appear in the list of GameObjects.
- In the Scene view: You will see a visual representation of the cube in the 3D space of your scene, typically placed at the origin (position 0, 0, 0) unless adjusted.
To see how the cube appears from the perspective of your game's camera:
- Select the Game tab. The Game view shows the final rendered output of your scene from the active camera. You should see the cube displayed here, assuming it's within the camera's view frustum.
Adding primitive shapes like cubes is a fundamental way to start prototyping levels, creating basic geometry, or serving as placeholders before importing custom 3D models.