{"__v":0,"_id":"58796782cd4a9c37007c9751","category":{"version":"58796781cd4a9c37007c96ef","project":"571fa55ca0acd42000af9545","_id":"58796781cd4a9c37007c96f1","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-31T16:56:01.612Z","from_sync":false,"order":1,"slug":"prefabs","title":"Prefabs"},"parentDoc":null,"project":"571fa55ca0acd42000af9545","user":"571fa519db52d01700f5cf3d","version":{"__v":4,"_id":"58796781cd4a9c37007c96ef","project":"571fa55ca0acd42000af9545","createdAt":"2017-01-13T23:49:21.393Z","releaseDate":"2017-01-13T23:49:21.393Z","categories":["58796781cd4a9c37007c96f0","58796781cd4a9c37007c96f1","58796781cd4a9c37007c96f2","58796781cd4a9c37007c96f3","58796781cd4a9c37007c96f4","58796781cd4a9c37007c96f5","58796781cd4a9c37007c96f6","58796781cd4a9c37007c96f7","58796781cd4a9c37007c96f8","58796781cd4a9c37007c96f9","58796781cd4a9c37007c96fa","58796781cd4a9c37007c96fb","58796781cd4a9c37007c96fc","58796781cd4a9c37007c96fd","58796781cd4a9c37007c96fe","58796781cd4a9c37007c96ff","58796781cd4a9c37007c9700","58b157ca1756cf370022f90d","58b1596f5dae732f00adeca2","58b1605a5dae732f00adecb1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Mukota","version_clean":"3.1.0","version":"3.1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-07-31T16:57:15.644Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"## Overview\n\nThis adds a UI element into the World Space that can be used to provide additional information about an object by providing a piece of text with a line drawn to a destination point.\n\nThere are a number of parameters that can be set on the Prefab which are provided by the `VRTK_ObjectTooltip` script which is applied to the prefab.\n\n## Inspector Parameters\n\n * **Display Text:** The text that is displayed on the tooltip.\n * **Font Size:** The size of the text that is displayed.\n * **Draw Line From:** An optional transform of where to start drawing the line from. If one is not provided the centre of the tooltip is used for the initial line position.\n * **Draw Line To:** A transform of another object in the scene that a line will be drawn from the tooltip to, this helps denote what the tooltip is in relation to. If no transform is provided and the tooltip is a child of another object, then the parent object's transform will be used as this destination position.\n * **Line Width:** The width of the line drawn between the tooltip and the destination transform.\n * **Font Color:** The colour to use for the text on the tooltip.\n * **Container Color:** The colour to use for the background container of the tooltip.\n * **Line Color:** The colour to use for the line drawn between the tooltip and the destination transform.\n\n## Class Methods\n\n### ResetTooltip/0\n\n  > `public void ResetTooltip()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * _none_\n\nThe ResetTooltip method resets the tooltip back to its initial state.\n\n### UpdateText/1\n\n  > `public void UpdateText(string newText)`\n\n  * Parameters\n   * `string newText` - A string containing the text to update the tooltip to display.\n  * Returns\n   * _none_\n\nThe UpdateText method allows the tooltip text to be updated at runtime.\n\n## Example\n\n`VRTK/Examples/029_Controller_Tooltips` displays two cubes that have an object tooltip added to them along with tooltips that have been added to the controllers.","excerpt":"","slug":"objecttooltip","type":"basic","title":"Object Tooltip"}
## Overview This adds a UI element into the World Space that can be used to provide additional information about an object by providing a piece of text with a line drawn to a destination point. There are a number of parameters that can be set on the Prefab which are provided by the `VRTK_ObjectTooltip` script which is applied to the prefab. ## Inspector Parameters * **Display Text:** The text that is displayed on the tooltip. * **Font Size:** The size of the text that is displayed. * **Draw Line From:** An optional transform of where to start drawing the line from. If one is not provided the centre of the tooltip is used for the initial line position. * **Draw Line To:** A transform of another object in the scene that a line will be drawn from the tooltip to, this helps denote what the tooltip is in relation to. If no transform is provided and the tooltip is a child of another object, then the parent object's transform will be used as this destination position. * **Line Width:** The width of the line drawn between the tooltip and the destination transform. * **Font Color:** The colour to use for the text on the tooltip. * **Container Color:** The colour to use for the background container of the tooltip. * **Line Color:** The colour to use for the line drawn between the tooltip and the destination transform. ## Class Methods ### ResetTooltip/0 > `public void ResetTooltip()` * Parameters * _none_ * Returns * _none_ The ResetTooltip method resets the tooltip back to its initial state. ### UpdateText/1 > `public void UpdateText(string newText)` * Parameters * `string newText` - A string containing the text to update the tooltip to display. * Returns * _none_ The UpdateText method allows the tooltip text to be updated at runtime. ## Example `VRTK/Examples/029_Controller_Tooltips` displays two cubes that have an object tooltip added to them along with tooltips that have been added to the controllers.