Do those exist?
I want to have an asset and when it is renamed, the “name” property of every class in the asset is changed to the name of the asset.
I also want to have a bool on the asset and when you check it, all “bools” on the classes become checked / unchecked.
Can anyone point me in the right direction?
Try looking into public properties with getters and setters, they help you perform actions when values are changed.
I’m talking about editor stuff. I read somewhere if I put scripts in an Editor folder the stuff will get executed in the editor? That might help me with #2 but not sure but when an asset is renamed.
Ahh, well in that case you’ll want to look at this: Unity - Scripting API: Editor
Yeah can’t find anything about an “OnAssetRenamed” event 
There is no “OnAssetRenamed” event, but you can make inspector code that stores the name of your object and checks each frame if the name has changed. Editor scripts run in the unity editor even in edit mode, so you can continue working and your script will continue doing what you have it do.
The link I gave you above is a reference for editor code and explains how you can set up a custom inspector so YOU can create an “OnAssetNamedEvent”. Keep in mind, editor scripts do NOT get included in a build, so expect them to only work in the Unity editor.
1 Like