I have a UnityEvent
field on a ScriptableObject, it accepts only prefab objects. How can I find that prefab in the scene and run that function in it.
I can get the Component
referenced from UnityEvent and use that to find the object, but it only gives the function as a string.
And Components have no Invoke()
on them, and SendMessage()
doesn’t seem to work on built-in components (I get “no receiver” error).
I feel like I’ve missed something obvious, and there is a much simpler way to do this. But at this point I could even go for a spaghetti solution as long as it works.