ShowIndicator¶
Introduction¶
ShowIndicator is used for displaying controller tips for each button. ShowIndicator has dependency on RenderModel.cs and as a precondition, and all devices that use ShowIndicator should follow WaveVR rules.
To use ShowIndicator, one of the following prerequisites should be met:
- Using a Customized Wave Controller.
- If a customized controller is used, make sure all of the mesh components in the controller model follow the naming rule defined by WaveVR. Refer to OEM Customization Guide for more details.
Show Indicator
- Disabled by default.
If
Show Indicator
is enabled, a controller loader will provide more options to you as follow.
Auto Layout
Auto Layout is an extension of ShowIndicator, enable Auto Layout
if you want to use AutoLayout. Refer to AutoLayout for more details.
Note
ShowIndicator and AutoLayout can be used independently when you add component to a controller model. However, AutoLayout will be disabled if both two components ShowIndicator and AutoLayout are added to the controller model and the option Auto Layout
in ShowIndicator is unchecked.
Show Indicator Angle
The pitch angle of the controller to show all the controller tips, default value is 30.
Hide Indicator by roll
To hide Indicator if a controller roll angle is more than 90 degrees, the default value is true.
Based On Emitter
Indicator is located on emitter mesh, the default value is true.
Line customization:
Line Length
For the line length between a button and Indicator, the default value is 0.03f and the range is 0.01f - 0.1f.
Line Start Width
For the starting width of a line, the default value is 0.0004f and the range is 0.0001f - 0.1f.
Line End Width
For the ending width of line, the default value is 0.0004f and the range is 0.0001f - 0.1f.
Line Color
For the line color, the default value is white.
Text customization (This used textMesh of Unity):
Text Character Size
For the non-Chinese character text size, the default value is 0.08f,the range is 0.1f - 0.2f.
Zh Character Size
For the Chinese character text size, the default value is 0.07f,the range is 0.1f - 0.2f.
Text Font Size
For the font text size, the default value is 100f,the range is 50 - 200f.
Text Color
For the text color, the default value is white.
Button indication:
This uses a list to show indication of button
Key Type
ShowIndicator supports the following buttons:
- Trigger
- Touch Pad
- Digital Trigger
- App
- Home
- Volume
- Volume Up
- Volume Down
- Grip
- D Pad_Left
- D Pad_Right
- D Pad_Up
- D Pad_Down
Alignment
If indication is present on either side, the default value is right.
Indication offset
The indication default value is computed by using the origin of the game object. You can use this offset value to adjust the position.
Use Multi-language
If checked, Indication text will show by locale. For how to use multi-languages, please refer to WaveVR_Resource
Indication text
If Use Multi-language
is not checked, indication text will be present. You can use the keyword “system” to show content of Key Type
defined by the system.
Indication key
If Use Multi-language
is checked, the indication key is used to query system resource. You can use keyword “system” to query a resource by a defined key-name, or use a custom key-name to query a resource.
Follow Button Rotation
The indication follows a button’s rotation, the default is false.
Resources¶
The script ShowIndicator.cs is located in Assets/Wave/Essence/Controller/Scripts