protected virtual void OnEnable() { if (controllerAlias == null) { VRTK_ControllerTracker controllerTracker = GetComponentInParent <VRTK_ControllerTracker>(); controllerAlias = (controllerTracker != null ? controllerTracker.gameObject : null); } if (controllerAlias == null) { VRTK_Logger.Error(VRTK_Logger.GetCommonMessage(VRTK_Logger.CommonMessageKeys.REQUIRED_COMPONENT_MISSING_NOT_INJECTED, "VRTK_ControllerHighlighter", "Controller Alias GameObject", "controllerAlias", "the same")); return; } ConfigureControllerPaths(); modelContainer = (modelContainer != null ? modelContainer : VRTK_DeviceFinder.GetModelAliasController(controllerAlias)); initHighlightersRoutine = StartCoroutine(WaitForModel()); }
protected virtual void OnEnable() { if (controllerAlias == null) { VRTK_ControllerTracker controllerTracker = GetComponentInParent <VRTK_ControllerTracker>(); controllerAlias = (controllerTracker != null ? controllerTracker.gameObject : null); } if (controllerAlias == null) { Debug.LogError("No Controller Alias GameObject can be found, either specify one in the `Controller Alias` parameter or apply this script to a `Controller Alias` GameObject."); return; } ConfigureControllerPaths(); modelContainer = (modelContainer != null ? modelContainer : VRTK_DeviceFinder.GetModelAliasController(controllerAlias)); initHighlightersRoutine = StartCoroutine(WaitForModel()); }