How can I check if there are any classes attached to an GameObject that inherit from a particular class?
Ie: Check if a GameObject has a concrete class that inherits from the abstract GunBase and if so, call the Fire() function of the concrete class.
I tried:
_gun = GetComponent<GunBase>();
But then i can only access functions of the abstract class and not the concrete.
Thanks