Assets/_Molca/_Core/Modals/ModalManager.csType:
RuntimeSubsystem (child of RuntimeManager prefab)
When to use
UseModalManager for built-in modal types (message toasts, confirmation dialogs, loading overlays). For product-specific or complex modals (text input, selection, progress with custom UI), see Shared modals.
Role
Shows informational messages, confirmations, loading overlays, andShowModal<T> for custom modal types. Prefabs and canvas wiring are assigned on the subsystem component in the Inspector.
Code
ModalManager.Instance only after RuntimeManager has created the subsystem (e.g. after await RuntimeManager.WaitForInitialization()). Loading overlays and typed modals use other APIs on the same class.
Troubleshooting
- Modal does not appear: confirm
ModalManager.Instanceis not null — the subsystem must exist on the RuntimeManager prefab and runtime must be initialized. - Modal appears behind other UI: check canvas sort order; ModalManager typically uses a high-priority canvas.
ShowModal<T>returns null: ensure the prefab for typeTis registered in the ModalManager component’s prefab list in the Inspector.
Related
- Shared modals — product-specific modal types (text input, selection, progress)
- RuntimeManager —
ModalManageris a child subsystem - Localization — modals with localized text
Unity Editor
RuntimeManager prefab → ModalManager component with modal prefab references.
