# InitializeExtraDataInstance(Object, int)

> This method is called during the initialization process of the Editor, after Awake and before OnEnable.

## Definition

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

```csharp
protected virtual void InitializeExtraDataInstance(Object extraData, int targetIndex)
```

### Parameters

**** (\[Object]\(/engine/6000.3/script-reference/unityengine/object)): A ScriptableObject instance of the type provided by [AssetImporterEditor.extraDataType](/engine/6000.3/script-reference/unityeditor/assetimporters/assetimportereditor/extradatatype.md).**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The corresponding [Editor.targets](/engine/6000.3/script-reference/unityeditor/editor/targets.md) index of the provided extraData.

### Remarks

If the AssetImporterEditor have the [CanEditMultipleObjects](/engine/6000.3/script-reference/unityeditor/caneditmultipleobjects.md) attribute and more than one Importer is selected, this method will be called once for each [AssetImporterEditor.extraDataTargets](/engine/6000.3/script-reference/unityeditor/assetimporters/assetimportereditor/extradatatargets.md) using targetIndex to find the corresponding [Editor.targets](/engine/6000.3/script-reference/unityeditor/editor/targets.md) Importer.

Note: Assembly reloading or external changes made to the inspected file in the Editor may trigger this method outside of the initialization loop. However, you should always reset your data in the given object when it gets called to make sure you stay up to date with the asset file.

See a usage example at [AssetImporterEditor.extraDataType](/engine/6000.3/script-reference/unityeditor/assetimporters/assetimportereditor/extradatatype.md).
