ToggleButtonGroupState
The structure that keeps track of the Button states inside a ToggleButtonGroup.
Read time 1 minuteLast updated 11 days ago
Definition
- Type: Struct
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Implements: IEquatable<ToggleButtonGroupState>, IComparable<ToggleButtonGroupState>
public struct ToggleButtonGroupState : IEquatable<ToggleButtonGroupState>, IComparable<ToggleButtonGroupState>
Remarks
To set properties on how to serialize this type, use ToggleButtonGroupStatePropertiesAttribute.
Constructors
Constructor | Description |
|---|---|
| ToggleButtonGroupState(System.UInt64,System.Int32) | Constructs a ToggleButtonGroupState. |
Properties
Property | Description |
|---|---|
| this[] | The option based on the index. |
| length | Returns the number of toggle button options available. |
Methods
Method | Description |
|---|---|
| CompareTo | Compares two ToggleButtonGroupState. |
| Equals | Compares the the current option set with an Object. |
| GetActiveOptions | Retrieves a Span of integers containing the active options as indices. |
| GetHashCode | Get the hashcode of this ToggleButtonGroupState. |
| GetInactiveOptions | Retrieves a Span of integers containing the inactive options as indices. |
| ResetAllOptions | Resets the states of the toggle buttons. |
| SetAllOptions | Sets all the available options to active. |
| ToggleAllOptions | Toggles all the available options' state. |
Static Methods
Method | Description |
|---|---|
| Compare | Compares two ToggleButtonGroupState of flag enum types. |
| CreateFromOptions | Helps generate a ToggleButtonGroupState based on a list of booleans. |
| FromEnumFlags | Creates a ToggleButtonGroupState based on a FlagsAttribute enum type. |
| ToEnumFlags | Synchronizes the internal data with the ToggleButtonGroupState from a FlagsAttribute. |
Operators
Operator | Description |
|---|---|
| operator == | Checks if both of the ToggleButtonGroupState are the same. |
| operator != | Checks if both of the ToggleButtonGroupState are not the same. |