Is there anyway to access a script’s method anonymously without knowing the script’s name?
Here’s my example – I have a bunch of ‘ability’ prefabs that I’m adding as properties to my player script. Abilities are interchangeable and they all share a ‘trigger’ method. I need to be able to call trigger on whichever ability I pass into the player, but getComponent needs a specific script name. Is it possible to do something like