Ejemplo n.º 1
0
        protected override void OnDestroy()
        {
            base.OnDestroy();
            OnSetupVRReady.Listeners -= Setup;

            if (ChangeDominantHandEvent.IsCallbackRegistered(ChangeDominantHand))
            {
                ChangeDominantHandEvent.Listeners -= ChangeDominantHand;
            }
        }
Ejemplo n.º 2
0
        private void ChangeDominantHand(ChangeDominantHandEvent info)
        {
            if (VRDF_Components.DeviceLoaded != EDevice.GEAR_VR && VRDF_Components.DeviceLoaded != EDevice.OCULUS_GO)
            {
                UnityEngine.Debug.LogError("<b>[VRDF] :</b> This feature is only available for when you use the GearVR or Oculus Go.");
                return;
            }

            Entities.ForEach((ref GoAndGearVRInputCapture singleController) =>
            {
                singleController.IsUserRightHanded = info.NewDominantHand == EHand.RIGHT;
                DisableUnusedHand(singleController.IsUserRightHanded);
            });
        }