Is there a "OnSavedProject" event?

Hi.

I’m working a production tool for my team. In order to automate some “refresh” functions, I’d like to trigger them when the user is doing some action like saving project or saving a scene.

I’m looking for something like this that would be called by Unity like void Start or Awake.

private void OnSavedProject()
    {
        DoStuff();
    }

Does that exists?

Thanks.

Hi,
I think having your own SaveAssetsProcessor could do it:
https://docs.unity3d.com/ScriptReference/AssetModificationProcessor.OnWillSaveAssets.html
Let me know if it works, I’d be curious to implement it myself in the future! :slight_smile:

Thanks a lot @Eldoir .

It turns out using OnValidate in a scriptable object should be a better choice in my case but I’ll keep you solution around.

I’ll let you know if I ever try the SaveAssetProcessor.

1 Like