GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - sgonzalezrozo/unity-screen-system: Declarative UI navigation for Unity with fullscreen, modal and alert layers.

BranchesTags
Open more actions menu

Latest commit

 

History

85 Commits
85 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
Documentation~
Documentation~
 
 
Editor
Editor
 
 
Runtime
Runtime
 
 
Samples~
Samples~
 
 
Tests
Tests
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CHANGELOG.md.meta
CHANGELOG.md.meta
 
 
Editor.meta
Editor.meta
 
 
LICENSE
LICENSE
 
 
LICENSE.meta
LICENSE.meta
 
 
README.md
README.md
 
 
README.md.meta
README.md.meta
 
 
Runtime.meta
Runtime.meta
 
 
Tests.meta
Tests.meta
 
 
llms.txt
llms.txt
 
 
llms.txt.meta
llms.txt.meta
 
 
package.json
package.json
 
 
package.json.meta
package.json.meta
 
 

Repository files navigation

Unity Screen System

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.

Unity Version License

Installation • Key Features • Quickstart • Code Examples • Core Concepts • API Reference

Getting Started • Editor Tools • Performance • Migration • Dependency Injection • AI Agents • Troubleshooting • FAQ • Project Status


Installation

Screen System depends on Tools Core. Unity doesn't install Git dependencies automatically, so add both, in this order:

  1. Open Window > Package Manager in Unity.
  2. Click + in the top-left corner and select Add package from git URL...
  3. 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 exists and assets 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.


Key Features

  • 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.

Quickstart

  1. Run Tools > Screen System > Setup, and click Create to add the splash and quit confirmation screens.

  2. Create a folder named Shop, right-click it in the Project window and select Screen System > New Screen. Add two Fullscreen screens, ShopMain and ShopDetail, and click Create. The folder is the feature: its name prefixes the screen IDs.

    The Project window's context menu: Screen System > New Screen and New Layer
  3. 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.

About

Declarative UI navigation for Unity with fullscreen, modal and alert layers.

Topics

addressablescsharpgamedevmodalnavigationnavigation-stackpopupscreenscreen-manageruguiuiui-layersui-managerui-navigationui-toolkitunityunity-packageunity3dunity6upm

Resources

Readme

Contributing

Contributing

Security policy

Security policy
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.