示例#1
0
        // Token: 0x06001472 RID: 5234 RVA: 0x00071D6C File Offset: 0x0006FF6C
        protected virtual void OnEnable()
        {
            this.modelContainer = VRTK_DeviceFinder.GetModelAliasController(base.gameObject);
            this.generateControllerHighlighter = false;
            VRTK_ControllerHighlighter component = base.GetComponent <VRTK_ControllerHighlighter>();

            if (component == null)
            {
                this.generateControllerHighlighter                     = true;
                this.controllerHighlighter                             = base.gameObject.AddComponent <VRTK_ControllerHighlighter>();
                this.controllerHighlighter.modelElementPaths           = this.modelElementPaths;
                this.controllerHighlighter.elementHighlighterOverrides = this.elementHighlighterOverrides;
                this.controllerHighlighter.ConfigureControllerPaths();
                return;
            }
            this.controllerHighlighter = component;
        }
        protected virtual void OnEnable()
        {
            modelContainer = VRTK_DeviceFinder.GetModelAliasController(gameObject);

            generateControllerHighlighter = false;
            VRTK_ControllerHighlighter existingControllerHighlighter = GetComponent <VRTK_ControllerHighlighter>();

            if (existingControllerHighlighter == null)
            {
                generateControllerHighlighter                     = true;
                controllerHighlighter                             = gameObject.AddComponent <VRTK_ControllerHighlighter>();
                controllerHighlighter.modelElementPaths           = modelElementPaths;
                controllerHighlighter.elementHighlighterOverrides = elementHighlighterOverrides;
                controllerHighlighter.ConfigureControllerPaths();
            }
            else
            {
                controllerHighlighter = existingControllerHighlighter;
            }
        }