I'm kinda new to scripting and I've got a basic question about class inheritance in Unity.
Let's say I want to make a base class named Enemy, which will contain the basic features shared by all enemies, and a derived class for every enemy type, for example, Orc and Goblin.
So I've got three different scripts: Enemy (the parent class), Orc and Goblin. And the question is: to which gameObjects should I attach them? I can only imagine the Orc and Goblin scripts must be attached to the Orc and Goblin prefabs, but where do I put the Enemy class?
Thanks in advance!
↧