# SaveAssets()

> Saves all serializable assets that have not yet been written to disk (eg. Materials).

## Definition

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

> **Warning:**
>
> **Removed.** Use AssetDatabase.SaveAssets instead
>
> **Upgrade to** [SaveAssets](/engine/6000.0/script-reference/unityeditor/assetdatabase/saveassets.md)

```csharp
public static void SaveAssets()
```

### Remarks

Also makes sure the asset database is written. This function does the same thing as [AssetDatabase.SaveAssets](/engine/6000.0/script-reference/unityeditor/assetdatabase/saveassets.md) with the exception that it is allowed to be called during serialization, and the AssetDatabase function is not.
