CodeBlanks Logo Icon CodeBlanks

Additive loading

Learn to layer scenes with LoadSceneMode.Additive.

Additive Scene Loading

In large game architectures, partitioning content across multiple scenes is cleaner than cramming everything into one file. Using LoadSceneMode.Additive preserves the active scene, layering the new scene on top like an overlay.

using UnityEngine.SceneManagement;

// Loading a UI scene additively on top of gameplay
SceneManager.LoadScene("UIScene", LoadSceneMode.Additive);

This allows a 3D gameplay world and an independent UI canvas scene to coexist simultaneously.

Multi-Scene Architecture and UnloadSceneAsync

In multi-scene setups, unloading secondary scenes that are no longer needed is executed via SceneManager.UnloadSceneAsync(). For instance, closing an inventory screen unloads the inventory scene.

// Purging the secondary UI scene from memory
SceneManager.UnloadSceneAsync("UIScene");

This technique enables open-world games to stream zones in and out dynamically in the background.

Practice Print base and additive scene info

Assign "World" to baseScene and "UIOverlay" to overlayScene. Print Base: World + Additive: UIOverlay to the console.

Starter code

Player.cs
using System;

class Program
{
    static void Main()
    {
        // baseScene ve overlayScene değerlerini tanımlayıp yazdır
    }
}

Sample solution

Player.cs
using System;

class Program
{
    static void Main()
    {
        string baseScene = "World";
        string overlayScene = "UIOverlay";
        Console.WriteLine("Base: " + baseScene + " + Additive: " + overlayScene);
    }
}

Expected output

Base: World + Additive: UIOverlay

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 What happens to the currently active scene when a new scene is loaded with LoadSceneMode.Additive?

  • The current scene remains loaded; the new scene is appended alongside/on top of it Correct answer
  • Camera output turns completely black and audio cuts out
  • All objects in the current scene are purged from memory and disk
  • The game engine crashes and the editor closes

Explanation: Additive mode does not close current scenes; it binds the incoming scene as an additional layer alongside them.

2 Select additive loading mode

Question
SceneManager.LoadScene("InventoryUI", LoadSceneMode.____);
Answer
SceneManager.LoadScene("InventoryUI", LoadSceneMode.Additive);

Explanation: Additive mode is used to layer a new scene without unloading the current active scene.

3 Additive scene concepts

Term Meaning
LoadSceneMode.Additive Adds scene without closing the current
UnloadSceneAsync Unloads an added scene from memory
Multi-scene Game split into multiple scene layers
UI Overlay Independent UI layered over game world

All lessons in Intermediate