#ScriptableObject asset callbacks

1 messages · Page 1 of 1 (latest)

carmine trench
#

Hello everyone! Does anyone know how to get a callback when a ScriptableObject asset is created/deleted, w/ a way to branch on the Type?

#

-AssetModificationProcessor.OnWillDeleteAsset would be perfect but. the docs say "don't use AssetDB in the callback"

  • AssetPostprocessor.OnPostprocessAllAssets would be great too, but the metadata is no longer in the AssetDB by the time my callback is invoked..
  • ObjectChangeEvents.changesPublished doesn't seem to actually send any ObjectChangeKind.Create/DestroyAssetObject events (for any type, not juts ScriptableObjects)
#

The only option i see is maintaining my own metadata outside of the AssetDB, but this feels gross.. any ideas? 🙏