How to reference a specific script asset type in Inspector?
Hello.
I'm trying to reference a script asset in my custom inspector for a scriptable object. I've come to understand I can use Object from UnityEngine or MonoScript to set a reference to a script asset through the inspector. This however allows any script or object type to be chosen and dragged in, and the selection drawer is populated with every object and asset available:
What I want is for the script asset variable to only accept a specific type of script, a script that inherits from a specific class, etc. Something like this:
I'm NOT trying to reference an instance of a script from a gameobject in the scene. How can I achieve what I want?
current.png
(19.4 kB)
goal.png
(24.8 kB)
Comment