...
Table of Contents |
---|
...
Overview
The Slide Switch is a component that simulates a physical control switch.
Note |
---|
The Slide Switch only works in runtime. |
...
Where to find
The Slide switch can be found under Standard Components > Slide Switch > Add Physical component.
...
Note |
---|
The Slide Switch must be placed as a child of a Kinematic Controller in the hierarchy. |
...
Feature layout - Physical Component
...
Live Data | |
Selected State | The current switch state and its ID of the Slide Switch. |
Properties | |
Prismatic Joint | The Prismatic Joint used in conjunction with the Slide Switch. |
ID | The ID of the switch state. |
Name | The Name of the switch state. |
Lower Weight | Determines in combination with the previous state’s Upper Weight where the transition between the two states occurs. |
Position | The Position of the Wheel Joint for the Switch State to activate. |
Upper Weight | Determines in combination with the nexst state’s Lower Weight where the transition between the two states occurs. |
On Selected() | Executes all actions in this box when the switch state is selected. |
On Unselected() | Executes all actions in this box when the switch state is no longer selected. |
Add new state | Creates a new switch state based on the current position of the Prismatic Joint. |
Use Scene Gizmo | When checked the gizmo is displayed in the scene view. The color of the gizmo can be changed with the colorfield after the checkbox. |
Control Panel | |
Generate Control Panel | Creates a Control Panel for the Slide Switch. |
Feature layout - Control Panel
...
Title | The Title of the Control Panel. Click to ping the target component in the hierarchy. Double click to edit. |
SlideSwitch Properties | |
Selected State | The current switch state and its ID of the Slide Switch. |
ID | The ID of the switch state. |
Target Component | |
Target Gameobject | The gameobject which has a standardcomponent you want the Control Panel for. |
Target Component | The Component which for which a Control Panel is generated. |
...
How to use
Create a new switch state and define its values.
...