# AreImporterTargetsValid()

> Determines whether every inspected importer target still exists.

## Definition

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

```csharp
protected bool AreImporterTargetsValid()
```

### Returns

| Type                                                          | Description                                                                                                                                                                                  |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if all target importers are still valid. Returns false if one or more targets have been destroyed, for example because the asset was deleted or its .meta GUID changed on disk. |

### Remarks

An AssetImporterEditor can outlive its target importer's native object. When this happens and the editor is re-enabled, accessing [Editor.serializedObject](/engine/6000.5/script-reference/unityeditor/editor/serializedobject.md) or other target-dependent state throws. Call this method at the start of an OnEnable override before accessing such state, and return early when it returns false.
