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

When to use

Use Valve Action 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

Completes when every ToolValveAction in valveActions fires onToolOperationComplete. On Initialize, sockets are disabled; on activate, each is enabled, listener registered, and ResetToolOperation() called. When all report done, Complete() is invoked after completionDelay.

Code

(SetTargetAngle exists on the step for per-socket targets — see full ValveActionStep.cs.)

Troubleshooting

  • Stuck — not all sockets complete — Ensure every ToolValveAction is in the array, onToolOperationComplete fires exactly once per intended op, and sockets are not left enabled from a prior run (deactivate should clear listeners).
  • Empty array error — Assign valveActions or place ToolValveAction components on/under the same GameObject for auto-discovery.
  • Delayed completion — Reduce completionDelay if the UX feels laggy after the last socket.

Unity Editor

ValveActionStep Inspector — compare fields to ValveStep.

ValveActionStep in Unity Inspector

ValveActionStep Inspector