# UpdateSupportedDataModes(IList<DataMode>, DataMode)

> Updates the list of DataMode s that the EditorWindow supports, and sets the preferred DataMode to use when the DataMode switcher UI is set to Automatic.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

```csharp
void UpdateSupportedDataModes(IList<DataMode> supportedDataMode, DataMode preferredDataMode)
```

### Parameters

**** (\[IList\<DataMode>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1)): A list of the supported DataModes.**** (\[DataMode]\(/engine/6000.0/script-reference/unityeditor/datamode)): Preferred data mode to use given the current context when the DataMode switcher UI is set to Automatic.

### Remarks

If the DataMode switcher UI is currently set to Automatic, the Editor window also changes to that preferred DataMode.
