- Home /
How to assign ScriptableObject reference via Editor script?
I'm trying to make a CustomEditor for a class wherein I press a button and it automatically fills in references to other ScriptableObjects from another Serialized list of them.
The Attribute Block is essentially a list of attributes, and when I press the "Update Values" button, the Editor calls a class function that fills out the Values list with new objects based on every Attribute in the block. Even though I initialize the Values with an Attribute in the class function, it doesn't seem to get Serialized inside the editor. Is there a way to automatically assign these ScriptableObject references by copying from the other list to the new one?
Or is it bad practice to call class functions inside Editor like this?
Your answer
Follow this Question
Related Questions
Event for loading component in the editor 2 Answers
Get the highlighted variable in the inspector 0 Answers
Perform action before script compilation 0 Answers
How to play mecanim animations in Editor mode? 2 Answers
Code for playing sound in editor in 5.5.0 does not appear to work in 2017.2 0 Answers