Show Loading in a Modal
Block a menu while a real asynchronous operation runs, then show success or error.
This tutorial presents asynchronous loading as a modal. The host owns the operation. CalmUI only displays its current state.
Build the modal in Studio
- Create View
LoadProgresswith layermodaland inputblock-below. - Add
LoadingStatefrom Components → Feedback. - Add
ErrorStatefor a failed result and bind its retry event to an Action Contract such asLoad.Retry. - Add Store fields
load.statusas a string andload.erroras a string. - Read those fields in the component and use
ui:ifto choose LoadingState or ErrorState. Useloading,failed, andreadyas your project's values. See conditional content for the exact directive. - Save and wait for package
Gameplayto update.
Start the operation
In the Blueprint that owns loading, first call Load CalmUI Package. From
Completed, set load.status to loading, then call Open CalmUI Modal.
Connect its Failed output to Print String using Error Message.
Owner-controlled loading
Load CalmUI Package
CalmUI|Advanced
Out: Completed · Failed
Set CalmUI String
CalmUI|Store
In: Player Controller · Field: load.status · Value: loading
Out: Boolean
Open CalmUI Modal
CalmUI
In: Player Controller · Package: Gameplay · Screen: LoadProgress
Out: Completed · Failed · Error Message
Close CalmUI Modal
CalmUI
In: Player Controller
Out: Boolean
Start the host operation after the modal opens. On success, set load.status to
ready and call Close CalmUI Modal. On failure, set load.status to
failed and write a safe user-facing message to load.error; keep the modal
open so Retry remains available.
Listen for Load.Retry once after package loading, using Listen for CalmUI
Action. When received, clear load.error, set the status back to loading,
and retry the real operation.
Loading is observation, not orchestration
CalmUI does not start save, network, or asset operations from LoadingState. It does not supply automatic progress or cancellation. Keep those operations in your host and publish only observed state.
If input reaches the menu behind it
- Confirm the View layer is
modaland input policy isblock-below. - Confirm Open CalmUI Modal completed successfully.
- Do not close the modal before the operation's completion callback.
- If Retry does nothing, print the action listener's Failed error first.