# IDataModeController

> Interface with which any EditorWindow can interact with DataMode functionalities. To obtain an instance, use EditorWindow.dataModeController.

## Definition

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

```csharp
public interface IDataModeController
```

## Remarks

This interface displays a switch in the docking area when the window is visible and has more than one supported DataModes.

## Properties

| Property                                                                                | Description                                                                                                                                                                                                                          |
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [dataMode](/engine/6000.0/script-reference/unityeditor/idatamodecontroller/datamode.md) | Returns the [DataMode](/engine/6000.0/script-reference/unityeditor/datamode.md) currently active for the [EditorWindow](/engine/6000.0/script-reference/unityeditor/editorwindow.md) that owns this instance of IDataModeController. |

## Methods

| Method                                                                                                                  | Description                                                                                                                                                                                                                                                                       |
| ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [TryChangeDataMode](/engine/6000.0/script-reference/unityeditor/idatamodecontroller/trychangedatamode.md)               | Requests a [DataMode](/engine/6000.0/script-reference/unityeditor/datamode.md) change for the [EditorWindow](/engine/6000.0/script-reference/unityeditor/editorwindow.md).                                                                                                        |
| [UpdateSupportedDataModes](/engine/6000.0/script-reference/unityeditor/idatamodecontroller/updatesupporteddatamodes.md) | Updates the list of [DataMode](/engine/6000.0/script-reference/unityeditor/datamode.md)s that the [EditorWindow](/engine/6000.0/script-reference/unityeditor/editorwindow.md) supports, and sets the preferred DataMode to use when the DataMode switcher UI is set to Automatic. |

## Events

| Member                                                                                                | Description                                                                                           |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [dataModeChanged](/engine/6000.0/script-reference/unityeditor/idatamodecontroller/datamodechanged.md) | Event for subscribing to [DataMode](/engine/6000.0/script-reference/unityeditor/datamode.md) changes. |
