U
tab 01Basics11 lessons — tap to open
06 / 11 · 8 min
Basics

Your first scene: a flat 3D floor

your project so far

Assets/

Scenes/

Arena.unity
FloorMain CameraDirectional Light

Materials/

M_Floor

you already havethis lesson adds

Time to build. The target for this lesson: an empty 3D scene with one flat floor, lit, with a camera looking at it.

animated diagram

A Plane is a flat surface at Y = 0. Everything else in the game stands on top of it.

Create the project

  1. 1

    Unity Hub → New project → template Universal 3D (called 3D (URP) in older versions). URP looks better and is what mobile wants.

  2. 2

    Name it UnityClass. Avoid spaces, accents and Vietnamese characters in the path.

  3. 3

    Once open, save the scene: File▸Save As → Assets/Scenes/Arena.unity

Add the floor

  1. 1

    GameObject▸3D Object▸Plane — a 10×10 metre floor appears.

  2. 2

    Rename it Floor in the Hierarchy (slow double-click, or F2).

  3. 3

    In the Inspector, set Position to 0, 0, 0. Right-click the Transform header → Reset does it in one click.

  4. 4

    Set Scale to 3, 1, 3 → now the floor is 30×30 metres. Plane scale 1 already equals 10 metres.

Give it a material

A Material is the colour and surface of an object. A mesh gives an object its shape; a material gives it its look.

  1. 1

    In Project: Assets▸Create▸Material, name it M_Floor.

  2. 2

    Set Base Map colour to a dark grey (#2B3040) and Smoothness to about 0.2.

  3. 3

    Drag M_Floor from the Project window straight onto the floor in the Scene view.

Optional: a grid texture so movement is readable

  • Without a pattern, a flat colour floor makes it impossible to tell whether the character is moving.

  • Set the material's Tiling to 10, 10 with any checker texture and the floor reads instantly.

Camera and light

  1. 1

    Select Main Camera. Set Position 0, 12, -14 and Rotation 35, 0, 0 — a clear, angled view from above.

  2. 2

    Faster way: move the Scene view where you like it, select the camera, then GameObject▸Align With View (Ctrl/Cmd+Shift+F).

  3. 3

    The Directional Light is already in the scene. Rotate it to about 50, -30, 0 for pleasant shadows.

Optional: build the floor from code instead

FloorBuilder.cs — attach to an empty GameObject
using UnityEngine;

public class FloorBuilder : MonoBehaviour
{
    public Material floorMaterial;
    public float sizeInMeters = 30f;

    void Start()
    {
        GameObject floor = GameObject.CreatePrimitive(PrimitiveType.Plane);
        floor.name = "Floor";
        floor.transform.position = Vector3.zero;
        floor.transform.localScale = Vector3.one * (sizeInMeters / 10f); // plane = 10 m
        if (floorMaterial != null)
            floor.GetComponent<Renderer>().material = floorMaterial;
    }
}