// Setup the scene for web player protected virtual void SetupWebPlayer() { if (!player) { return; } SixenseInput sixenseInput = player.GetComponentInChildren <SixenseInput> (); if (sixenseInput) { sixenseInput.enabled = false; } SixenseHandControllerExtender[] sixenseHandControllers = player.GetComponentsInChildren <SixenseHandControllerExtender> (); foreach (SixenseHandControllerExtender sixenseHandController in sixenseHandControllers) { sixenseHandController.enabled = false; } LeapHandControllerExtender leapHandController = player.GetComponentInChildren <LeapHandControllerExtender> (); if (leapHandController) { leapHandController.enabled = false; } }
public void UIToggleLeapVR() { StorageManager.data.optionControlsLeapVR = toggleLeapVR.value; GameObject player = GameObject.FindGameObjectWithTag("Player"); if (!player) { return; } LeapHandControllerExtender controller = player.GetComponentInChildren <LeapHandControllerExtender> (); if (controller) { controller.isOrientationSet = false; controller.SetOrientation(); } }