{"_id":"5b1f9307d4c5f000036b57f2","project":"571fa55ca0acd42000af9545","version":{"_id":"5b1f8576c2505d00031254db","project":"571fa55ca0acd42000af9545","__v":4,"forked_from":"594949e52be16d0026ec04cd","createdAt":"2017-06-20T16:14:29.816Z","releaseDate":"2017-06-20T16:14:29.816Z","categories":["5b1f8576c2505d0003125424","5b1f8576c2505d0003125425","5b1f8576c2505d0003125426","5b1f8576c2505d0003125427","5b1f8576c2505d0003125428","5b1f8576c2505d0003125429","5b1f8576c2505d000312542a","5b1f8576c2505d000312542b","5b1f8576c2505d000312542c","5b1f8576c2505d000312542d","5b1f8576c2505d000312542e","5b1f8576c2505d000312542f","5b1f8576c2505d0003125430","5b1f8576c2505d0003125431","5b1f8576c2505d0003125432","5b1f8576c2505d0003125433","5b1f8576c2505d0003125434","5b1f8576c2505d0003125435","5b1f8576c2505d0003125436","5b1f8576c2505d0003125437","5b1f8576c2505d0003125438","5b1f8aab9c683000032979e7","5b1f8b2f3073470003ffa5da","5b1f8bd9fd653400031d94f4","5b1f900bd4c5f000036b57bd"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Mangalica","version_clean":"3.3.0","version":"3.3.0"},"category":{"_id":"5b1f8576c2505d000312542a","version":"5b1f8576c2505d00031254db","project":"571fa55ca0acd42000af9545","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-01-01T16:45:52.489Z","from_sync":false,"order":7,"slug":"interactions","title":"Interactables"},"user":"571fa519db52d01700f5cf3d","githubsync":"","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-12T09:31:51.051Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"> extends [VRTK_InteractableListener](doc:vrtk_interactablelistener)\n\n## Overview\n\nEnable highlighting of an Interactable Object base on interaction type.\n\n**Required Components:**\n * `VRTK_InteractableObject` - The Interactable Object component to detect interactions on. This must be applied on the same GameObject as this script if one is not provided via the `Object To Monitor` parameter.\n\n**Optional Components:**\n * `VRTK_BaseHighlighter` - The highlighter to use when highligting the Object. If one is not already injected in the `Object Highlighter` parameter then the component on the same GameObject will be used.\n\n**Script Usage:**\n * Place the `VRTK_InteractObjectHighlighter` script on either:\n   * The GameObject of the Interactable Object to detect interactions on.\n   * Any other scene GameObject and provide a valid `VRTK_InteractableObject` component to the `Object To Affect` parameter of this script.\n\n## Inspector Parameters\n\n * **Near Touch Highlight:** The colour to highlight the object on the near touch interaction.\n * **Touch Highlight:** The colour to highlight the object on the touch interaction.\n * **Grab Highlight:** The colour to highlight the object on the grab interaction.\n * **Use Highlight:** The colour to highlight the object on the use interaction.\n * **Object To Highlight:** The GameObject to highlight.\n * **Object Highlighter:** An optional Highlighter to use when highlighting the specified Object. If this is left blank, then the first active highlighter on the same GameObject will be used, if one isn't found then a Material Color Swap Highlighter will be created at runtime.\n\n## Class Events\n\n * `InteractObjectHighlighterHighlighted` - Emitted when the object is highlighted\n * `InteractObjectHighlighterUnhighlighted` - Emitted when the object is unhighlighted\n\n## Unity Events\n\nAdding the `VRTK_InteractObjectHighlighter_UnityEvents` component to `VRTK_InteractObjectHighlighter` object allows access to `UnityEvents` that will react identically to the Class Events.\n\n * All C# delegate events are mapped to a Unity Event with the `On` prefix. e.g. `MyEvent` -> `OnMyEvent`.\n\n## Event Payload\n\n * `VRTK_InteractableObject.InteractionType interactionType` - The type of interaction occuring on the object to monitor.\n * `Color highlightColor` - The colour being provided to highlight the affected object with.\n * `GameObject affectingObject` - The GameObject is initiating the highlight via an interaction.\n * `VRTK_InteractableObject objectToMonitor` - The Interactable Object that is being interacted with.\n * `GameObject affectedObject` - The GameObject that is being highlighted.\n\n## Class Methods\n\n### ResetHighlighter/0\n\n  > `public virtual void ResetHighlighter()`\n\n * Parameters\n   * _none_\n * Returns\n   * _none_\n\nThe ResetHighlighter method is used to reset the currently attached highlighter.\n\n### Highlight/1\n\n  > `public virtual void Highlight(Color highlightColor)`\n\n * Parameters\n   * `Color highlightColor` - The colour to apply to the highlighter.\n * Returns\n   * _none_\n\nThe Highlight method turns on the highlighter with the given Color.\n\n### Unhighlight/0\n\n  > `public virtual void Unhighlight()`\n\n * Parameters\n   * _none_\n * Returns\n   * _none_\n\nThe Unhighlight method turns off the highlighter.\n\n### GetCurrentHighlightColor/0\n\n  > `public virtual Color GetCurrentHighlightColor()`\n\n * Parameters\n   * _none_\n * Returns\n   * `Color` - The Color that the Interactable Object is being highlighted to.\n\nThe GetCurrentHighlightColor returns the colour that the Interactable Object is currently being highlighted to.","excerpt":"","slug":"vrtk_interactobjecthighlighter","type":"basic","title":"VRTK_InteractObjectHighlighter"}

VRTK_InteractObjectHighlighter


> extends [VRTK_InteractableListener](doc:vrtk_interactablelistener) ## Overview Enable highlighting of an Interactable Object base on interaction type. **Required Components:** * `VRTK_InteractableObject` - The Interactable Object component to detect interactions on. This must be applied on the same GameObject as this script if one is not provided via the `Object To Monitor` parameter. **Optional Components:** * `VRTK_BaseHighlighter` - The highlighter to use when highligting the Object. If one is not already injected in the `Object Highlighter` parameter then the component on the same GameObject will be used. **Script Usage:** * Place the `VRTK_InteractObjectHighlighter` script on either: * The GameObject of the Interactable Object to detect interactions on. * Any other scene GameObject and provide a valid `VRTK_InteractableObject` component to the `Object To Affect` parameter of this script. ## Inspector Parameters * **Near Touch Highlight:** The colour to highlight the object on the near touch interaction. * **Touch Highlight:** The colour to highlight the object on the touch interaction. * **Grab Highlight:** The colour to highlight the object on the grab interaction. * **Use Highlight:** The colour to highlight the object on the use interaction. * **Object To Highlight:** The GameObject to highlight. * **Object Highlighter:** An optional Highlighter to use when highlighting the specified Object. If this is left blank, then the first active highlighter on the same GameObject will be used, if one isn't found then a Material Color Swap Highlighter will be created at runtime. ## Class Events * `InteractObjectHighlighterHighlighted` - Emitted when the object is highlighted * `InteractObjectHighlighterUnhighlighted` - Emitted when the object is unhighlighted ## Unity Events Adding the `VRTK_InteractObjectHighlighter_UnityEvents` component to `VRTK_InteractObjectHighlighter` object allows access to `UnityEvents` that will react identically to the Class Events. * All C# delegate events are mapped to a Unity Event with the `On` prefix. e.g. `MyEvent` -> `OnMyEvent`. ## Event Payload * `VRTK_InteractableObject.InteractionType interactionType` - The type of interaction occuring on the object to monitor. * `Color highlightColor` - The colour being provided to highlight the affected object with. * `GameObject affectingObject` - The GameObject is initiating the highlight via an interaction. * `VRTK_InteractableObject objectToMonitor` - The Interactable Object that is being interacted with. * `GameObject affectedObject` - The GameObject that is being highlighted. ## Class Methods ### ResetHighlighter/0 > `public virtual void ResetHighlighter()` * Parameters * _none_ * Returns * _none_ The ResetHighlighter method is used to reset the currently attached highlighter. ### Highlight/1 > `public virtual void Highlight(Color highlightColor)` * Parameters * `Color highlightColor` - The colour to apply to the highlighter. * Returns * _none_ The Highlight method turns on the highlighter with the given Color. ### Unhighlight/0 > `public virtual void Unhighlight()` * Parameters * _none_ * Returns * _none_ The Unhighlight method turns off the highlighter. ### GetCurrentHighlightColor/0 > `public virtual Color GetCurrentHighlightColor()` * Parameters * _none_ * Returns * `Color` - The Color that the Interactable Object is being highlighted to. The GetCurrentHighlightColor returns the colour that the Interactable Object is currently being highlighted to.