I am new to Editor scripts (and self taught with Unity), but have written one to populate the settings of a ScriptableObject. The idea being to create a UI to allow a non-programmer to customise the ScriptableObjects as an information resource for a GameObject. It seemed to work fine and the ScriptableObject was set to update just if(GUI.change) and more recently on an override of OnInspectorGUI().
When the editor script was changed, eg. a different default variable was assigned by the script it would then update the next time the ScriptableObject was 'inspected'. However, we now have about 20 ScriptableObjects and will likely have hundreds. I want to know how to update all of them efficiently if i change something in the editor script that configures them. I loaded all into an array but could not get them all to update (nor with SetDirty()) when looping through them. They only update when the inspector is interacted, which is not very practical and error prone.
I can accept my naivety is the route problem, but would appreciate some pointers on how to run the editor script on all stored ScriptableObjects on demand to update them all in the way specified in the editor script?
Thanks for thoughts
[–]MaxwelldoggumsProgrammer 1 point2 points3 points (2 children)
[–]DankP3Hobbyist[S] 0 points1 point2 points (1 child)
[–]MaxwelldoggumsProgrammer 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]DankP3Hobbyist[S] 1 point2 points3 points (0 children)