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:
| Shape | Notes |
|---|---|
| Cube | One unit on each side. |
| Sphere | One unit across. Segments and Rings set how smooth it is. |
| Cylinder, Capsule, Cone | Segments sets how smooth the round part is. |
| Plane | A flat square on the ground, facing up. |
| Custom | Pick 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:
| Property | What it does |
|---|---|
| Color | The surface color. Multiplied with the albedo texture when there is one. |
| Albedo | A texture for the surface’s color. |
| Tiling, Offset | How many times the texture repeats across the surface, and where it starts. |
| Metallic | 0 for wood, plastic, stone and skin; 1 for bare metal. A metal reflects its color instead of showing it. |
| Roughness | 0 is a mirror, 1 is chalk. 0.5 to start. |
| Metal/Rough Map | A texture varying both across the surface: roughness in its green channel, metallic in its blue, the way glTF and most tools export it. |
| Emissive, Emission | Light the surface gives off, added after lighting. Turn up a camera’s bloom to make it glow. |
| Blend | How 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.