Unity

Assets and Scenes

Estimated reading: 3 minutes 390 views Contributors

By the end, you’ll have:
✅ A new Unity project
✅ A downloaded free asset added to your game
✅ A new scene
✅ A simple scene transition
✅ A one-button “Start Game” UI


What You’ll Need

  • Unity Hub (download from https://unity.com/download)
  • Unity Editor (any recent LTS version like 2022 or later)
  • A free Unity account (to access the Asset Store)

Step 1: Create a New Project

  1. Open Unity Hub.
  2. Click New Project → Choose a 3D (URP optional) template.
  3. Name it something like “MyFirstGame” and click Create Project.
  4. Wait for Unity to load.

Step 2: Download a Free Asset

Let’s add a free environment or character from the Asset Store.

  1. In Unity, click Window → Asset Store → Search Online
    (or go to https://assetstore.unity.com).
  2. Search for “Free 3D model” or “Free environment”.
    For example, try “Low Poly Free Pack” by Synty Studios or “Free Skybox”.
  3. Click Add to My Assets → then click Open in Unity (Unity Hub may prompt you).
  4. In Unity, the Package Manager window opens automatically.
  5. Click Download → Import.
  6. In the Import dialog, make sure all files are checked → Import.

✅ Your asset is now in your Project window, probably under a folder like Assets/FreePack/.


Step 3: Create a New Scene

Let’s make two scenes — one for the Menu, and one for the Game.

  1. Go to File → New Scene.
  2. Save it as “MainMenu” (File → Save As → name it).
  3. Create another scene and save it as “GameScene”.

Now you should see both scenes in your Assets folder.


Step 4: Create a Simple Start Menu UI

  1. Open your MainMenu scene.
  2. In the Hierarchy, right-click → UI → Button (TextMeshPro).
    • If it asks to import TMP Essentials, click Import TMP Essentials.
  3. Rename the button to StartButton.
  4. In the Scene view, you’ll see a Canvas and a Button.
  5. Change the button text to “Start Game”.
    • Expand the Button → select Text (TMP) → edit text in the Inspector.

Step 5: Add a Scene Transition Script

We’ll write a simple script that loads the GameScene when the button is clicked.

  1. Create a folder: Assets → Scripts.
  2. Inside, right-click → Create → C# Script → name it SceneLoader.
  3. Double-click to open it (in Visual Studio or VS Code).
  4. Replace everything with this:
using UnityEngine;
using UnityEngine.SceneManagement;

public class SceneLoader : MonoBehaviour
{
    public void LoadGame()
    {
        SceneManager.LoadScene("GameScene");
    }
}
  1. Save the script and go back to Unity.

🎮 Step 6: Connect the Button

  1. In the MainMenu scene, click the StartButton.
  2. In the Inspector, scroll down to the Button (Script) component.
  3. Under On Click (), click the + button.
  4. Drag any GameObject with the script on it into the slot (you can use an empty GameObject):
    • Right-click in Hierarchy → Create Empty → name it SceneLoaderObject.
    • Drag the SceneLoader script onto it.
  5. In the OnClick() dropdown, choose
    SceneLoader → LoadGame().

✅ Now your button will load the GameScene!


Step 7: Add Something to the Game Scene

  1. Open the GameScene.
  2. Drag one of your imported 3D assets into the scene (like a tree or ground).
  3. Click Play to see your scene.
  4. Stop the game, then open File → Build Settings → click Add Open Scenes for both MainMenu and GameScene (so Unity knows to include them in builds).

Step 8: Test the Game

  1. Open the MainMenu scene.
  2. Click Play.
  3. Press the Start Game button — it should switch to your GameScene!

🎉 Congratulations — you’ve made a basic two-scene Unity project with a working Start Game button!


Share this Doc

Assets and Scenes

Or copy link

CONTENTS

Chat Icon Close Icon