DESIGNED & BUILT BY
✦ SANTIAGO GONZÁLEZ ROZO (@sgonzalezrozo) ✦
A layer-based UI manager for uGUI and UI Toolkit: shared layers with automatic draw order, only what's visible renders, and everything unloads on scene change. 1–5 ms cached shows.
Installation • Key Features • Quickstart • Code Examples • Core Concepts • API Reference
Getting Started • Editor Tools • Performance • Migration • Dependency Injection • AI Agents • Troubleshooting • FAQ • Project Status
Screen System depends on Tools Core. Unity doesn't install Git dependencies automatically, so add both, in this order:
- Open Window > Package Manager in Unity.
- Click
+in the top-left corner and select Add package from git URL... - Paste each URL below and click Add:
https://github.com/sgonzalezrozo/unity-tools-core.git
* Tools Core is needed only by Screen System, Fast IoC and UI Scroller. Add it once, even if you use several of them.
https://github.com/sgonzalezrozo/unity-screen-system.git
Wait for each package to compile. Add the first URL, wait until Unity finishes importing and compiling, then add the next. Adding a package while Unity is still importing the previous one can log
ScriptableSingleton already existsandassets located in immutable packages were unexpectedly altered. They don't block anything: clear the Console and continue. If they come back when you open the project without adding a package, report it.
Requirements and tested platforms: Getting Started.
Assembly references. If your code is in an assembly definition (.asmdef), add ScreenSystem and ToolsCore to its Assembly Definition References. Unity doesn't add them for you, and without them the build fails with CS0246. New Screen and New Layer add them to the folder's .asmdef, and move ScreenIds next to it when it's in a folder with no .asmdef, since an .asmdef can't see Assembly-CSharp.
- Screens built from layers: a screen is a prefab plus an ordered list of layers, like layers in an image editor. A top bar or background is one prefab that any screen can list. Screens share one instance, and draw order is set for you.
- Only what's visible renders: at most one fullscreen, one modal and one alert render at once. Behind a modal, a blurred snapshot replaces the screen, and nothing runs per frame.
- Memory that cleans itself up: screens load on request and unload on scene change. Addressables handles are released, with no leaks across scene changes.
- Measured on real devices: 1–5 ms cached shows on four phones with IL2CPP. A benchmark sample runs the same measurements on your own screens.
- Fits into your project: uGUI, UI Toolkit or both; Resources or Addressables; any DI container or none. Adopt it one menu at a time beside your existing UI.
-
Run Tools > Screen System > Setup, and click Create to add the splash and quit confirmation screens.
-
Create a folder named
Shop, right-click it in the Project window and select Screen System > New Screen. Add twoFullscreenscreens,ShopMainandShopDetail, and click Create. The folder is the feature: its name prefixes the screen IDs.
-
Open the screen from any script:
ScreenManager screens = await ScreenManager.WhenReadyAsync(); await screens.SetRoot("ShopMain"); // first screen await screens.GoTo("ShopDetail"); // push another await screens.GoBack(); // and back
View full sample script
using System; using ScreenSystem; using UnityEngine; // Add to any object in your first scene. public class GameBoot : MonoBehaviour { private async void Start() { try { ScreenManager screens = await ScreenManager.WhenReadyAsync(); if (screens != null) await screens.SetRoot("ShopMain"); } catch (Exception exception) { Debug.LogException(exception); } } } // Add to the ShopMain prefab and wire the methods to buttons. public class ShopMainScreen : MonoBehaviour, IScreenLifecycle { public void OpenDetail() => ScreenManager.Instance.GoTo("ShopDetail").Forget("Open detail"); public void Back() => ScreenManager.Instance.GoBack().Forget("Back"); // Use these instead of OnEnable/OnDisable: hidden layers stay active. public void OnScreenShown() => Debug.Log("Shop shown"); public void OnScreenHidden() => Debug.Log("Shop hidden"); }
The full walkthrough is in Getting Started.