Skip to main content
Folder: Assets/_MolcaSDK/Code/Scripts/Utilities/ Examples: InputHelper, QRScanner, ProximityTrigger, TransformHelper, RectTransformHelper, DelayedEvent, various toggles and counters.

Boundary

Keep utilities XR-agnostic when possible; VR-specific logic belongs under _VR/Scripts.

Code

Most helpers are static methods or small MonoBehaviour components you drop on a GameObject and configure in the Inspector. Example pattern:
Open the concrete utility script (e.g. ProximityTrigger, QRScanner) for real events and inspector fields.

Troubleshooting

  • ProximityTrigger never fires — Layer / Physics matrix: verify colliders on target and Trigger flag; distance-based checks need Update or rigidbody motion as designed in script.
  • QRScanner no result — Camera permission on device, sufficient light, and WebCamTexture availability in Editor (often limited); read console for platform-specific errors.
  • TransformHelper / RectTransformHelper odd values — Parent RectTransform anchors and canvas scale affect “local” helpers; reset anchors before calling alignment helpers.
  • DelayedEvent double fire — Re-enable / duplicate MonoBehaviour instances can schedule twice; cancel or guard with a bool in OnDisable.
  • InputHelper (if present) not reading — New Input System vs legacy: ensure the active input configuration matches what the helper expects.

Unity Editor

Utilities Inspector

Utility component