CodeSmile AssetDatabase 1.9
Unity's AssetDatabase in enjoyable, consistent, concise, convenient, comprehensible, safe, documented form.
Loading...
Searching...
No Matches

◆ ForceSave()

static void ForceSave ( [NotNull] Object asset)
static

Forces the object to be saved to disk. Marks the object as dirty and then calls CodeSmileEditor.Asset.File.Save.

This should only be used if the asset doesn't save otherwise, since unnecessarily writing an object to disk is a slow operation. Example where this may be required would be changes to fields of a ScriptableObject without using the SerializedObject or SerializedProperty classes.

Parameters
assetThe asset to mark as dirty, then save.
See also