Exemple #1
0
        void Start()
        {
            List <XRGestureSubsystem> gestureSubsystems = new List <XRGestureSubsystem>();

            SubsystemManager.GetInstances <XRGestureSubsystem>(gestureSubsystems);
            foreach (var subsystem in gestureSubsystems)
            {
                if (subsystem != null && subsystem is WindowsMRGestureSubsystem)
                {
                    gestureSubsystem = subsystem as WindowsMRGestureSubsystem;
                }
            }

            OnValidate();
        }
        WindowsMRGestureSubsystem GetGestureSubsystemIfNeeded()
        {
            if (gestureSubsystem == null)
            {
                List <XRGestureSubsystem> gestureSubsystems = new List <XRGestureSubsystem>();
                SubsystemManager.GetInstances <XRGestureSubsystem>(gestureSubsystems);
                foreach (var subsystem in gestureSubsystems)
                {
                    if (subsystem != null && subsystem is WindowsMRGestureSubsystem)
                    {
                        gestureSubsystem = subsystem as WindowsMRGestureSubsystem;
                    }
                }

                OnValidate();
            }

            return(gestureSubsystem);
        }
 public WindowsMRGestureProvider(WindowsMRGestureSubsystem subsystem)
 {
     m_Subsystem = subsystem;
 }