buttontoggler - eisclimber/ExPresS-XR GitHub Wiki

ButtonToggler

Class in ExPresSXR.Misc

Inherits from UnityEngine.MonoBehaviour

Summary

Allows toggling the state of a ui button for supporting on the fly toggleMode.

public class ButtonToggler : MonoBehaviour

Fields

Name Description
OnToggleChanged Emitted when the toggle state changes, providing the toggle pressed state.

Methods

Name Description
ToggleButton() Toggles the buttons pressed state. Fails if _connectToClick is disabled, to prevent multiple toggles.

Properties

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).
⚠️ **GitHub.com Fallback** ⚠️