API reference
Everything you call
The public surface is small on purpose. All async calls return a plain System.Threading.Tasks.Task.
UiManager UiFramework.Runtime.Manager
| Call | What it does |
|---|---|
InitializeAsync(UiState defaultState = null) | Creates the manager (kept with DontDestroyOnLoad) and loads UiConfig from Addressables. Safe to call again |
ShowState<T>(object context = null, bool additive = false, UiTransition transition = null) | Shows the state whose key equals T's class name |
ShowStateByKey(string stateKey, object context = null, bool additive = false, UiTransition transition = null) | Shows a state by key |
HideUI(UiTransition transition = null) | Pops the top state, plays its hide animations and releases its scenes |
ResetUIAsync() | Hides and unloads every state |
GetCurrentState() | The state being loaded, otherwise the top of the stack, otherwise null |
IsLastSceneActive<T>() | Whether T is the top state |
TryGetUiStateKeyName<T>(out string key) | The key registered for T |
IsInitialized | True once InitializeAsync created the manager |
UiElement UiFramework.Core
| Member | Use |
|---|---|
Populate(object context = null) | Override to read your data. Runs on every show of the scene, including when shared; keep it idempotent |
PrepareForShow() / PrepareForShow(string presetKey) | Puts the element in its show start pose before its first frame. The string overload runs when a UiTransition overrides the preset |
ShowAsync(string presetKey = null) | Plays the show animation. Override to add or replace motion |
HideAsync(string presetKey = null) | Plays the hide animation |
Serialized showAnimationPreset, hideAnimationPreset | Set in the Elements tab |
UiTransition UiFramework.Core
| Member | Use |
|---|---|
UiTransition.ShowWith(string showPreset) | Override only the show animation |
UiTransition.HideWith(string hidePreset) | Override only the hide animation |
new UiTransition(string showPreset, string hidePreset) | Override both; null keeps each element's own |
UiTransition.Default | No override |
Preset names are matched ignoring case. An unknown name logs a warning and falls back to the elements' own animations, so a typo never breaks navigation.
TweenPresets and Tween UiFramework.Tweening
| Member | Use |
|---|---|
NoneKey, FadeKey, ScaleKey, SlideLeftKey, SlideRightKey, SlideUpKey, SlideDownKey, ClickPopKey, SettlePopKey, ShakeKey | Preset names |
PlayAsync(string presetKey, GameObject target, bool isShow) | Plays a preset on any object |
PrepareShow(string presetKey, GameObject target) | Puts an object in a preset's start pose |
ClickPop, SettlePop, ShakeLocal | Feedback effects, no fade |
Describe(string presetKey, bool isShow), GetPresetKeys(), TryGetPresetKey | For tools and menus |
Tween.RunAsync(owner, duration, ease, unscaled, ct, keepRunning, apply) | The shared animation loop: frame-capped, stops when the owner is destroyed or keepRunning turns false |
TweenCurves.EaseOut, EaseIn, EaseInOut, Linear | Curves |
Other types
UiState | Base class for state type markers: public class StoreUiState : UiState, generated by the States tab |
UiPopulationParams | Base for the data you pass as context |
UiElementReference | Base for generated element reference helpers |