Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ToggleButtonGroupState

The structure that keeps track of the Button states inside a ToggleButtonGroup.
Read time 1 minuteLast updated 11 days ago

Definition

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.
lengthReturns the number of toggle button options available.

Methods

Method

Description

CompareToCompares two ToggleButtonGroupState.
EqualsCompares the the current option set with an Object.
GetActiveOptionsRetrieves a Span of integers containing the active options as indices.
GetHashCodeGet the hashcode of this ToggleButtonGroupState.
GetInactiveOptionsRetrieves a Span of integers containing the inactive options as indices.
ResetAllOptionsResets the states of the toggle buttons.
SetAllOptionsSets all the available options to active.
ToggleAllOptionsToggles all the available options' state.

Static Methods

Method

Description

CompareCompares two ToggleButtonGroupState of flag enum types.
CreateFromOptionsHelps generate a ToggleButtonGroupState based on a list of booleans.
FromEnumFlagsCreates a ToggleButtonGroupState based on a FlagsAttribute enum type.
ToEnumFlagsSynchronizes 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.