# ToEnumFlags<T>(ToggleButtonGroupState, bool)

> Synchronizes the internal data with the ToggleButtonGroupState from a FlagsAttribute.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.3/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public static T ToEnumFlags<T>(ToggleButtonGroupState options, bool acceptsLengthMismatch = true) where T : Enum
```

### Parameters

**** (\[ToggleButtonGroupState]\(/engine/6000.3/script-reference/unityengine/uielements/togglebuttongroupstate)): The option set to be synced against.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): The ability to synchronize two option sets of different sizes.

### Returns

| Type | Description       |
| ---- | ----------------- |
| T    | A flag enum type. |
