-3

Want to access ScriptableObject data from an editor code, namely a custom Node Graph Editor code:

  1. Create a ScriptableObject containing Color field.

  2. Create an instance of that SO and set the Color in the inspector.

  3. Acquire that SO instance from an editor script.(if this was a Monobehavior we could drag drop into a SerializeField, how to achieve this from an editor script?)

  4. Use the color from SO instance.

  • This might not even be possible, if it isn't can someone comment and clarify so I can delete this question. Just trying to make my editor code more managable. – IndividualGames Feb 16 '23 at 12:53

1 Answers1

1

You can use :

SO SOInstance = Resources.Load("PATH_OF_YOUR_SO");

https://docs.unity3d.com/ScriptReference/Resources.Load.html

Davanci
  • 38
  • 6