|
SaveAssetsProcessor lets you hook into saving of serialized assets and scenes which are edited inside Unity.
Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.
This lets you prevent writing of assets by Unity for integration with VCS solutions like Perforce which require locking of files.
OnWillSaveAssets |
This is called by Unity when it is about to write serialized assets or scene files to disk. |