Skip to main content
File: Assets/_MolcaSDK/_VR/Scripts/Scenario/Steps/PopUpStep.cs
Base: Step

When to use

Use Popup Step when a VR training scenario needs this specific interaction as a step in a sequence. Configure entirely in the Inspector — no code required.

Role

Blocks the SequenceController until UI conditions are met (exact rules in serialized fields).

Code

PopUpStep.cs requires ModalManager.Instance, StepInfo auxiliary (auto-added in OnValidate), and shows either customModal (ModalConfirmation) or ShowRegularConfirmation. The Yes callback calls Complete(). Optional autoComplete + autoCompleteDelay invokes Complete() on a timer. The same StepInfo type feeds Scenario UI task-list titles when that HUD is present — see VR step auxiliaries.

Troubleshooting

  • ModalManager not found — Bootstrap Modal manager / Runtime prefab so Instance exists.
  • StepInfo not found — Add StepInfo auxiliary to the step (Inspector should add via OnValidate).
  • Button does nothing — If yesText.disabled, confirmation passes null callbacks for yes — enable text or provide a non-disabled DynamicLocalization.

Unity Editor

PopUpStep + referenced Canvas / modal.

PopUpStep in Unity Inspector

PopUpStep Inspector