File:Documentation Index
Fetch the complete documentation index at: https://docs-unity.molca.id/llms.txt
Use this file to discover all available pages before exploring further.
Assets/_MolcaSDK/_VR/Scripts/Base/MolcaInteractionBase.cs
Role
- Discovers
XRGrabInteractable - Tracks which interactor is active
- Lock / unlock interaction
- Implements analog interaction contracts used by valve/knob flows
Interactions/.
Code
Derive fromMolcaInteractionBase, let Awake auto-pick XRBaseInteractable on the same object (or assign interactable in the Inspector), and implement UpdateInteraction() for per-frame behavior while the user is interacting. The base registers with ReferenceManager after RuntimeManager is ready.
ValveInteraction / KnobInteraction for analog value plumbing.
Troubleshooting
- Interactable null — Assign
interactableor rely onAwake(sameGameObjectonly — no child search). - Reference / SceneObjectReference not found —
ReferenceManager.Registerruns afterWaitForInitialization; ensureReferenceManagerexists andrefIdis stable (OnValidategenerates ids). - Unexpected drops —
maxInteractionDistance> 0 forcesForceReleasewhen hand is too far; set 0 to disable. UpdateInteractionnot running — Only called whileisInteracting; verify XRIselectEntered/selectExitedwiring oninteractable.
Related
- Recipe: Implement custom VR interactions — step-by-step guide for creating custom VR interaction components
Unity Editor
Valve or Knob prefab root showing MolcaInteractionBase-derived component + XRGrabInteractable.
