Making games

Meshes and materials

An object is drawn by a Mesh Renderer: a shape, and a material for its surface.

Shapes

The renderer’s Shape is one of the built-in shapes, or Custom for a mesh from a model file:

ShapeNotes
CubeOne unit on each side.
SphereOne unit across. Segments and Rings set how smooth it is.
Cylinder, Capsule, ConeSegments sets how smooth the round part is.
PlaneA flat square on the ground, facing up.
CustomPick a mesh in Mesh: any mesh inside a model you’ve imported.

A built-in shape is sized with the object’s Scale, not with numbers on the renderer: a 4 by 1 by 2 floor slab is a cube scaled 4, 1, 2. Every cube in a scene shares one mesh this way, so a thousand cubes cost about what one does.

Cast shadows and Receive shadows decide whether the object throws a shadow and whether shadows fall on it. Visible hides it without removing it.

Materials

A material is a .omat file describing a surface. Every object using it looks the same, and editing it changes them all. To give an object a new one, click the Material field on its Mesh Renderer and make a New Material there, or pick one you already have.

A material’s properties show in a folded section on the Mesh Renderer’s card, and on their own when you select the .omat file in the Assets panel:

PropertyWhat it does
ColorThe surface color. Multiplied with the albedo texture when there is one.
AlbedoA texture for the surface’s color.
Tiling, OffsetHow many times the texture repeats across the surface, and where it starts.
Metallic0 for wood, plastic, stone and skin; 1 for bare metal. A metal reflects its color instead of showing it.
Roughness0 is a mirror, 1 is chalk. 0.5 to start.
Metal/Rough MapA texture varying both across the surface: roughness in its green channel, metallic in its blue, the way glTF and most tools export it.
Emissive, EmissionLight the surface gives off, added after lighting. Turn up a camera’s bloom to make it glow.
BlendHow the color’s alpha is used: Opaque ignores it, Cutout discards anything below Alpha Cutoff (leaves, fences, grass), Transparent blends it over what’s behind.

Materials imported with a model keep what the model said, and are ordinary .omat files you can edit afterwards.

Text in the world

A Text component draws a line of text in the scene: a sign, a label over a character’s head. Its Size is in world units, so text one unit tall is as tall as a cube. Turn on Billboard to keep it facing the camera.