com.xmobitea.changx.mini-ui
v1.5.2
Published
Scene-authored Unity UI toolkit with popup/view orchestration, list helpers, and utility components.
Readme
XmobiTea UI
Scene-authored Unity UI package for popup/view orchestration, reusable list cells, tab menus, safe-area helpers, loading/message controllers, and RectTransform utilities.
Task Entry Points
Open the smallest file for the task.
| Need | Use |
| --- | --- |
| Choose the right task file | AI_USAGE.md |
| Scene UIManager setup | AI_SETUP_UIManager.md |
| UISettings/registry/constants setup | AI_SETUP_UISettings.md |
| Create or edit a view | DOCS_UIView.md |
| Create or edit a popup | DOCS_UIPopup.md |
| Custom canvas, loading/messages, state checks, Escape | DOCS_UIManager.md |
| Lists | DOCS_UIList.md |
| Tabs | DOCS_UITabButtonMenu.md |
| Utility components | DOCS_UIUtilityComponents.md |
| RectTransform helpers | DOCS_UIExtensions.md |
| API reference routing | AI_API_REFERENCE.md |
| Package rules for agents | AGENTS.md |
| Missing/conflicting detail | source under Runtime/ or Editor/ |
Core Contract
- Namespace:
XmobiTea.MiniUI; base classes:XmobiTea.MiniUI.Core. UIViewBaseandUIPopupBaseare separate abstractMonoBehaviourbases.- Entry point: one scene-hosted
UIManager : Singleton<UIManager>. - Runtime settings asset:
Assets/Resources/XmobiTea UISettings.asset. - Load path:
Resources.Load<UISettings>("XmobiTea UISettings"). - Popup/view ids are exact registered prefab names.
- Default canvas id is
-1. - Overloads without
canvasIdtarget default canvas-1. - Constants are optional string wrappers generated from
UISettings. - Runtime does not auto-create
UIManager,UISettings, prefabs, or controllers.
Common Calls
using XmobiTea.MiniUI;
UIManager.ShowView("UIInventoryView", playerId); // example custom view prefab id
UIManager.YesNoMessageBox("Notice", "Continue?", () => UnityEngine.Debug.Log("Confirmed"));
UIManager.MessageBox("Notice", "Saved.", true);
UIManager.ShowLoading(true, "Loading...");
UIManager.ShowLoading(false);UIInventoryView in this snippet is an example custom prefab name that you create and register yourself. The built-in popup helpers provided by the package are MessageBox(...) and YesNoMessageBox(...), and they require UIMessageBoxPopup / UIYesNoMessageBoxPopup to be registered in UISettings.uiPopupBases.
Hard Limits
ShowView()reuses the first instantiated view with the same name, even if active.ShowPopup()reuses only inactive popups; an active popup can be duplicated.- Popup/view stack counts are show-history depth, not unique visible object counts.
HideView()does not pop the view stack;HideAllView()clears it.- For custom-canvas view destroy, keep the returned view instance and use
HideView(canvasId, view, isDestroy: true). - Built-in message-box popups self-close through default-canvas
HidePopup(this); on custom canvases, close the returned popup externally. OnCustomShow(params object[])payloads are positional contracts.OnCustomHide()also runs fromOnDestroy(); cleanup must be repeat-safe.- Escape handling only checks default canvas
-1. SafeAreaComponentreads cachedUIManager.safeArea; it does not track changes automatically.
Package Metadata
- Package:
com.xmobitea.changx.mini-ui - Unity:
2022.3+ - Runtime assembly:
com.xmobitea.changx.mini-ui.runtime - Editor assembly:
com.xmobitea.changx.mini-ui.editor - License:
Apache-2.0
