示例#1
0
        /// Helper function to find the Event Executor that is part of
        /// the input module if one exists in the scene.
        public static I3vrEventExecutor FindEventExecutor()
        {
            I3vrPointerInputModule i3vrInputModule = FindInputModule();

            if (i3vrInputModule == null)
            {
                return(null);
            }

            return(i3vrInputModule.EventExecutor);
        }
示例#2
0
        /// Helper function to find the input module if one exists in the
        /// scene and it is the active module.
        public static I3vrPointerInputModule FindInputModule()
        {
            if (EventSystem.current == null)
            {
                return(null);
            }

            BaseInputModule inputModule = EventSystem.current.currentInputModule;

            if (inputModule == null)
            {
                return(null);
            }

            I3vrPointerInputModule i3vrInputModule = inputModule as I3vrPointerInputModule;

            return(i3vrInputModule);
        }