# TryChangeDataMode(DataMode)

> Requests a DataMode change for the EditorWindow.

## Definition

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

```csharp
bool TryChangeDataMode(DataMode newDataMode)
```

### Parameters

**** (\[DataMode]\(/engine/6000.0/script-reference/unityeditor/datamode)): The DataMode to which the Editor window should change.

### Returns

| Type                                                          | Description                                                          |
| ------------------------------------------------------------- | -------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Whether current Editor window has changed to the requested DataMode. |

### Remarks

If the DataMode isn't supported or if the DataMode switcher UI isn't set to Automatic, the change request won't work.
