# OnEnable()

> This function is called when the object is loaded.

## Definition

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

```csharp
public virtual void OnEnable()
```

### Remarks

```csharp
using UnityEngine;
using UnityEditor;
using UnityEditor.AssetImporters;

public class ExampleScript : AssetImporterEditor
{
    public override void OnEnable()
    {
        base.OnEnable();
        Debug.Log("editor was enabled");
    }
}
```

OnEnable cannot be a co-routine.
