/// <summary> /// The HighlightElement method attempts to highlight a specific controller element. /// </summary> /// <param name="elementType">The element type on the controller.</param> /// <param name="color">The Color to highlight the controller element to.</param> /// <param name="fadeDuration">The duration in seconds to fade from the initial color to the target color.</param> public virtual void HighlightElement(SDK_BaseController.ControllerElements elementType, Color color, float fadeDuration = 0f) { Transform element = GetElementTransform(GetPathForControllerElement(elementType)); if (element != null) { VRTK_ObjectAppearance.HighlightObject(element.gameObject, color, fadeDuration); SetColourParameter(elementType, color); } }
// Token: 0x0600154C RID: 5452 RVA: 0x00075924 File Offset: 0x00073B24 protected virtual void ToggleHighlightAlias(bool state, string transformPath, Color?highlight, float duration = 0f) { Transform elementTransform = this.GetElementTransform(transformPath); if (elementTransform) { if (state) { VRTK_ObjectAppearance.HighlightObject(elementTransform.gameObject, (highlight != null) ? highlight : new Color?(Color.white), duration); return; } VRTK_ObjectAppearance.UnhighlightObject(elementTransform.gameObject); } }
protected virtual void ToggleHighlightAlias(bool state, string transformPath, Color?highlight, float duration = 0f) { Transform element = GetElementTransform(transformPath); if (element) { if (state) { VRTK_ObjectAppearance.HighlightObject(element.gameObject, (highlight != null ? highlight : Color.white), duration); } else { VRTK_ObjectAppearance.UnhighlightObject(element.gameObject); } } }
public static void HighlightObject(GameObject model, Color?highlightColor, float fadeDuration = 0f) { VRTK_ObjectAppearance.HighlightObject(model, highlightColor, fadeDuration); }