Super quick question about inheritance and GetComponent()

Suppose I have class Enemy, and I create a child class called Wizard.

Gameobject John has Wizard component in him. If via my script I call John.GetComponent<Enemy>(); will I get the Wizard component?

In other works, does calling GetComponent on the parent class return any child class of it?

Yes it works like that.
2 hours… would’ve been faster to just try i guess :slight_smile: