Skip to main content

UI System - Overview

AchEngine UI System is a layer-based UI management system. Views registered in UIViewCatalog can be shown or closed by ID or type, and it includes object pooling, transition animations, and single-instance mode out of the box.

Core Components

ClassRole
UIRootRoot canvas manager for every layer
UIBootstrapperInitializes the UI system when the scene starts
IUIService / UIFacade for showing and hiding views
UIViewBase class for every view
UIViewCatalogScriptableObject that registers view prefabs
UIViewPoolPool for reusing view instances

Layer Structure

Open / Close Views

var ui = ServiceLocator.Resolve<IUIService>();

// -- Open ------------------------------------------------
ui.Show("MainMenu"); // By string ID
ui.Show<MainMenuView>("MainMenu"); // Type + ID (returns typed view)
ui.Show("ItemDetail", new ItemPayload(item)); // ID + payload

// -- Close -----------------------------------------------
ui.Close("MainMenu"); // By string ID
ui.CloseTopmost(); // Close the topmost open view
ui.CloseAll(); // Close everything

Next Steps