buttontoggler - eisclimber/ExPresS-XR GitHub Wiki
Class in ExPresSXR.Misc
Inherits from UnityEngine.MonoBehaviour
Allows toggling the state of a ui button for supporting on the fly toggleMode.
public class ButtonToggler : MonoBehaviour| Name | Description |
|---|---|
| OnToggleChanged | Emitted when the toggle state changes, providing the toggle pressed state. |
| Name | Description |
|---|---|
| ToggleButton() | Toggles the buttons pressed state. Fails if _connectToClick is disabled, to prevent multiple toggles. |
| Name | Description |
|---|---|
| ConnectToClick | If enabled, will attempt to connect to the 'onClick' event of the button. Do not call ToggleButton in this case! |
| Pressed | If the button should be considered pressed (toggledDown) or not (toggledUp). |