{"_id":"59495530cb42790024c9d45f","project":"571fa55ca0acd42000af9545","version":{"_id":"594949e52be16d0026ec04cd","project":"571fa55ca0acd42000af9545","__v":2,"createdAt":"2017-06-20T16:14:29.816Z","releaseDate":"2017-06-20T16:14:29.816Z","categories":["594949e62be16d0026ec04ce","594949e62be16d0026ec04cf","594949e62be16d0026ec04d0","594949e62be16d0026ec04d1","594949e62be16d0026ec04d2","594949e62be16d0026ec04d3","594949e62be16d0026ec04d4","594949e62be16d0026ec04d5","594949e62be16d0026ec04d6","594949e62be16d0026ec04d7","594949e62be16d0026ec04d8","594949e62be16d0026ec04d9","594949e62be16d0026ec04da","594949e62be16d0026ec04db","594949e62be16d0026ec04dc","594949e62be16d0026ec04dd","594949e62be16d0026ec04de","594949e62be16d0026ec04df","594949e62be16d0026ec04e0","594949e62be16d0026ec04e1","59497219f4a8980024dd0631"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Kunekune","version_clean":"3.2.0","version":"3.2.0"},"category":{"_id":"594949e62be16d0026ec04d4","version":"594949e52be16d0026ec04cd","project":"571fa55ca0acd42000af9545","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-01-01T16:45:52.489Z","from_sync":false,"order":6,"slug":"interactions","title":"Interactions"},"user":"571fa519db52d01700f5cf3d","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-06-20T17:02:40.187Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"## Overview\n\nThe Controller Highlighter script provides methods to deal with highlighting controller elements.\n\nThe highlighting of the controller is defaulted to use the `VRTK_MaterialColorSwapHighlighter` if no other highlighter is applied to the Object.\n\n## Inspector Parameters\n\n * **Transition Duration:** The amount of time to take to transition to the set highlight colour.\n * **Highlight Controller:** The colour to set the entire controller highlight colour to.\n * **Highlight Body:** The colour to set the body highlight colour to.\n * **Highlight Trigger:** The colour to set the trigger highlight colour to.\n * **Highlight Grip:** The colour to set the grip highlight colour to.\n * **Highlight Touchpad:** The colour to set the touchpad highlight colour to.\n * **Highlight Button One:** The colour to set the button one highlight colour to.\n * **Highlight Button Two:** The colour to set the button two highlight colour to.\n * **Highlight System Menu:** The colour to set the system menu highlight colour to.\n * **Highlight Start Menu:** The colour to set the start menu highlight colour to.\n * **Model Element Paths:** A collection of strings that determine the path to the controller model sub elements for identifying the model parts at runtime. If the paths are left empty they will default to the model element paths of the selected SDK Bridge.\n * **Element Highlighter Overrides:** A collection of highlighter overrides for each controller model sub element. If no highlighter override is given then highlighter on the Controller game object is used.\n * **Controller Alias:** An optional GameObject to specify which controller to apply the script methods to. If this is left blank then this script is required to be placed on a Controller Alias GameObject.\n * **Model Container:** An optional GameObject to specifiy where the controller models are. If this is left blank then the Model Alias object will be used.\n\n## Class Methods\n\n### ConfigureControllerPaths/0\n\n  > `public virtual void ConfigureControllerPaths()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * _none_\n\nThe ConfigureControllerPaths method is used to set up the model element paths.\n\n### PopulateHighlighters/0\n\n  > `public virtual void PopulateHighlighters()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * _none_\n\nThe PopulateHighlighters method sets up the highlighters on the controller model.\n\n### HighlightController/2\n\n  > `public virtual void HighlightController(Color color, float fadeDuration = 0f)`\n\n  * Parameters\n   * `Color color` - The colour to highlight the controller to.\n   * `float fadeDuration` - The duration in time to fade from the initial colour to the target colour.\n  * Returns\n   * _none_\n\nThe HighlightController method attempts to highlight all sub models of the controller.\n\n### UnhighlightController/0\n\n  > `public virtual void UnhighlightController()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * _none_\n\nThe UnhighlightController method attempts to remove the highlight from all sub models of the controller.\n\n### HighlightElement/3\n\n  > `public virtual void HighlightElement(SDK_BaseController.ControllerElements elementType, Color color, float fadeDuration = 0f)`\n\n  * Parameters\n   * `SDK_BaseController.ControllerElements elementType` - The element type on the controller.\n   * `Color color` - The colour to highlight the controller element to.\n   * `float fadeDuration` - The duration in time to fade from the initial colour to the target colour.\n  * Returns\n   * _none_\n\nThe HighlightElement method attempts to highlight a specific controller element.\n\n### UnhighlightElement/1\n\n  > `public virtual void UnhighlightElement(SDK_BaseController.ControllerElements elementType)`\n\n  * Parameters\n   * `SDK_BaseController.ControllerElements elementType` - The element type on the controller.\n  * Returns\n   * _none_\n\nThe UnhighlightElement method attempts to remove the highlight from the specific controller element.\n\n## Example\n\n`VRTK/Examples/035_Controller_OpacityAndHighlighting` demonstrates the ability to change the opacity of a controller model and to highlight specific elements of a controller such as the buttons or even the entire controller model.","excerpt":"","slug":"vrtk_controllerhighlighter","type":"basic","title":"VRTK_ControllerHighlighter"}

VRTK_ControllerHighlighter


## Overview The Controller Highlighter script provides methods to deal with highlighting controller elements. The highlighting of the controller is defaulted to use the `VRTK_MaterialColorSwapHighlighter` if no other highlighter is applied to the Object. ## Inspector Parameters * **Transition Duration:** The amount of time to take to transition to the set highlight colour. * **Highlight Controller:** The colour to set the entire controller highlight colour to. * **Highlight Body:** The colour to set the body highlight colour to. * **Highlight Trigger:** The colour to set the trigger highlight colour to. * **Highlight Grip:** The colour to set the grip highlight colour to. * **Highlight Touchpad:** The colour to set the touchpad highlight colour to. * **Highlight Button One:** The colour to set the button one highlight colour to. * **Highlight Button Two:** The colour to set the button two highlight colour to. * **Highlight System Menu:** The colour to set the system menu highlight colour to. * **Highlight Start Menu:** The colour to set the start menu highlight colour to. * **Model Element Paths:** A collection of strings that determine the path to the controller model sub elements for identifying the model parts at runtime. If the paths are left empty they will default to the model element paths of the selected SDK Bridge. * **Element Highlighter Overrides:** A collection of highlighter overrides for each controller model sub element. If no highlighter override is given then highlighter on the Controller game object is used. * **Controller Alias:** An optional GameObject to specify which controller to apply the script methods to. If this is left blank then this script is required to be placed on a Controller Alias GameObject. * **Model Container:** An optional GameObject to specifiy where the controller models are. If this is left blank then the Model Alias object will be used. ## Class Methods ### ConfigureControllerPaths/0 > `public virtual void ConfigureControllerPaths()` * Parameters * _none_ * Returns * _none_ The ConfigureControllerPaths method is used to set up the model element paths. ### PopulateHighlighters/0 > `public virtual void PopulateHighlighters()` * Parameters * _none_ * Returns * _none_ The PopulateHighlighters method sets up the highlighters on the controller model. ### HighlightController/2 > `public virtual void HighlightController(Color color, float fadeDuration = 0f)` * Parameters * `Color color` - The colour to highlight the controller to. * `float fadeDuration` - The duration in time to fade from the initial colour to the target colour. * Returns * _none_ The HighlightController method attempts to highlight all sub models of the controller. ### UnhighlightController/0 > `public virtual void UnhighlightController()` * Parameters * _none_ * Returns * _none_ The UnhighlightController method attempts to remove the highlight from all sub models of the controller. ### HighlightElement/3 > `public virtual void HighlightElement(SDK_BaseController.ControllerElements elementType, Color color, float fadeDuration = 0f)` * Parameters * `SDK_BaseController.ControllerElements elementType` - The element type on the controller. * `Color color` - The colour to highlight the controller element to. * `float fadeDuration` - The duration in time to fade from the initial colour to the target colour. * Returns * _none_ The HighlightElement method attempts to highlight a specific controller element. ### UnhighlightElement/1 > `public virtual void UnhighlightElement(SDK_BaseController.ControllerElements elementType)` * Parameters * `SDK_BaseController.ControllerElements elementType` - The element type on the controller. * Returns * _none_ The UnhighlightElement method attempts to remove the highlight from the specific controller element. ## Example `VRTK/Examples/035_Controller_OpacityAndHighlighting` demonstrates the ability to change the opacity of a controller model and to highlight specific elements of a controller such as the buttons or even the entire controller model.