protected virtual void InitListeners()
        {
            if (controllerEvents != null)
            {
                controllerEvents.ControllerEnabled        += DoControllerEnabled;
                controllerEvents.ControllerVisible        += DoControllerVisible;
                controllerEvents.ControllerHidden         += DoControllerInvisible;
                controllerEvents.ControllerModelAvailable += DoControllerModelAvailable;
            }
            else
            {
                trackedController = GetComponentInParent <VRTK_TrackedController>();
                if (trackedController != null)
                {
                    trackedController.ControllerModelAvailable += TrackedControllerDoControllerModelAvailable;
                }
            }

            headsetControllerAware = (headsetControllerAware != null ? headsetControllerAware : FindObjectOfType <VRTK_HeadsetControllerAware>());
            if (headsetControllerAware != null)
            {
                headsetControllerAware.ControllerGlanceEnter += DoGlanceEnterController;
                headsetControllerAware.ControllerGlanceExit  += DoGlanceExitController;
                ToggleTips(false);
            }
        }
        private IEnumerator EnableAtEndOfFrame()
        {
            if (basicTeleport == null)
            {
                yield break;
            }
            yield return new WaitForEndOfFrame();

            headset = VRTK_ObjectCache.registeredHeadsetControllerAwareness;
            if (headset)
            {
                headset.ControllerObscured += new HeadsetControllerAwareEventHandler(DisableTeleport);
                headset.ControllerUnobscured += new HeadsetControllerAwareEventHandler(EnableTeleport);
            }
        }
        protected virtual IEnumerator EnableAtEndOfFrame()
        {
            if (basicTeleport == null)
            {
                yield break;
            }
            yield return(new WaitForEndOfFrame());

            headset = VRTK_ObjectCache.registeredHeadsetControllerAwareness;
            if (headset)
            {
                headset.ControllerObscured   += new HeadsetControllerAwareEventHandler(DisableTeleport);
                headset.ControllerUnobscured += new HeadsetControllerAwareEventHandler(EnableTeleport);
            }
        }
        protected virtual void OnEnable()
        {
            if (controllerEvents != null)
            {
                controllerEvents.ControllerVisible += DoControllerVisible;
                controllerEvents.ControllerHidden  += DoControllerInvisible;
            }

            headsetControllerAware = FindObjectOfType <VRTK_HeadsetControllerAware>();
            if (headsetControllerAware)
            {
                headsetControllerAware.ControllerGlanceEnter += DoGlanceEnterController;
                headsetControllerAware.ControllerGlanceExit  += DoGlanceExitController;
                ToggleTips(false);
            }
        }
        protected virtual void OnEnable()
        {
            if (controllerActions)
            {
                controllerActions.ControllerModelVisible   += new ControllerActionsEventHandler(DoControllerVisible);
                controllerActions.ControllerModelInvisible += new ControllerActionsEventHandler(DoControllerInvisible);
            }

            headsetControllerAware = FindObjectOfType <VRTK_HeadsetControllerAware>();
            if (headsetControllerAware)
            {
                headsetControllerAware.ControllerGlanceEnter += new HeadsetControllerAwareEventHandler(DoGlanceEnterController);
                headsetControllerAware.ControllerGlanceExit  += new HeadsetControllerAwareEventHandler(DoGlanceExitController);
                ToggleTips(false);
            }
        }
        protected virtual IEnumerator EnableAtEndOfFrame()
        {
            if (teleporter == null)
            {
                yield break;
            }
            yield return(new WaitForEndOfFrame());

            headsetControllerAware = (headsetControllerAware != null ? headsetControllerAware : FindObjectOfType <VRTK_HeadsetControllerAware>());
            if (headsetControllerAware == null)
            {
                VRTK_Logger.Error(VRTK_Logger.GetCommonMessage(VRTK_Logger.CommonMessageKeys.REQUIRED_COMPONENT_MISSING_FROM_SCENE, "VRTK_TeleportDisableOnControllerObscured", "VRTK_HeadsetControllerAware"));
            }
            else
            {
                headsetControllerAware.ControllerObscured   += new HeadsetControllerAwareEventHandler(DisableTeleport);
                headsetControllerAware.ControllerUnobscured += new HeadsetControllerAwareEventHandler(EnableTeleport);
            }
        }
        private void OnEnable()
        {
            if (controllerActions)
            {
                controllerActions.ControllerModelVisible += new ControllerActionsEventHandler(DoControllerVisible);
                controllerActions.ControllerModelInvisible += new ControllerActionsEventHandler(DoControllerInvisible);
            }

            headsetControllerAware = FindObjectOfType<VRTK_HeadsetControllerAware>();
            if (headsetControllerAware)
            {
                headsetControllerAware.ControllerGlanceEnter += new HeadsetControllerAwareEventHandler(DoGlanceEnterController);
                headsetControllerAware.ControllerGlanceExit += new HeadsetControllerAwareEventHandler(DoGlanceExitController);
                ToggleTips(false);
            }
        }