Documentation

Support

Unity Studio

Open Unity Studio

Unity Studio

Cube primitive

Add a cube to your scene and edit its properties.
Read time 1 minuteLast updated 2 days ago

A Cube primitive is a simple six-sided 3D shape you can add to a scene without importing a custom mesh. You can use them as placeholders in prototypes, or as final assets like crates, buildings, platforms, or rectangular parts of larger objects and characters.

Cube properties

The following properties are available on Cube primitives.

Change the values of this component to update the object's position, rotation, or size.

Property

Description

PositionSet or retrieve the object's location in 3D world space (X, Y, Z).
RotationSet or retrieve the object's rotation around the X, Y, and Z axes (degrees).
ScaleUse the X, Y, and Z values to change or retrieve the object's size.

You need a Mesh Renderer component to display meshes in your scene. Without this component, a mesh can't be visible.

Property

Description

MeshAssign the mesh you want to show in your scene.
MaterialsA list of materials that belong to this mesh. Expand the material to edit its properties.
Edit MaterialExpand one of the materials to show this option. When you select this option, Unity Studio makes a copy of the material and assigns the copied material to the mesh. Because the material is a copy, you can change its properties without affecting other meshes that use the same original material. To change the material on all objects, refer to Edit the material in the My Assets folder.

Material properties

Select Edit Material to change the properties of the material.For information about the material settings, refer to Material reference.

A Box Collider is a physics collider shaped like a rectangular box (cube or cuboid). Use this collider on straight-edged objects that need to detect or respond to collisions. For example, boxes, walls, and platforms. You can adjust its size and center to fit your mesh.

Property

Description

Use as TriggerEnable to let other objects pass through this object without collision, but still fire events when the objects overlap. Disable to make the object unable to pass through.
CenterDefine the center of the object where the collider starts from.
SizeChange the size of the collider.

Adjust how objects move and interact with gravity. You can set the mass of the object and choose whether it’s affected by gravity.

Property

Description

MassDefine the mass of the object.
Use GravityEnable for gravity to impact the object. Object falls during Play mode unless it's grounded. Disable for gravity to have no impact.

A Box Collider is a physics collider shaped like a rectangular box (cube or cuboid). Use this collider on straight-edged objects that need to detect or respond to collisions. For example, boxes, walls, and platforms. You can adjust its size and center to fit your mesh.

Property

Description

Use as TriggerEnable to let other objects pass through this object without collision, but still fire events when the objects overlap. Disable to make the object unable to pass through.
CenterDefine the center of the object where the collider starts from.
SizeChange the size of the collider.

Additional resources