# SaveAndReimport()

> Save asset importer settings if asset importer is dirty.

## Definition

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

```csharp
public void SaveAndReimport()
```

### Remarks

Under the hood this calls [AssetDatabase.ImportAsset](/engine/6000.5/script-reference/unityeditor/assetdatabase/importasset.md). Additional Resources: [EditorUtility.SetDirty](/engine/6000.5/script-reference/unityeditor/editorutility/setdirty.md).

### Examples

```csharp
using UnityEngine;
using UnityEditor;
public class SaveAndReinportExample : MonoBehaviour
{
    [MenuItem("Tools/SaveAndReimportExample")]
    static void Example()
    {
        var importer = AssetImporter.GetAtPath("Path/To/Your/Asset");

        //Setting asset as dirty to mark it for reimport
        EditorUtility.SetDirty(importer);
        //Save and reimport to apply changes
        importer.SaveAndReimport();
    }
}
```
