Basically I have a game with characters using different inheritance subclasses. This game is more of strategy game so there isn’t one specific player character, but a virtual class Character with three subclasses (class in game) lets just say warrior, archer, and brute. Within each of those classes the character can be friendly or enemy. My question is how do I deal with inheritance in Unity since you attach scripts to game objects in order to use them? For the game objects in the scene, do I just apply the bottom most subclass to the game object, do I do the top most and do different code to link based on how the character is being used, or do I just attach all of the scripts to the object and deal with it?
Lastly, I plan on doing some procedural enemy generation, so I’ll eventually have to create a random amount of enemies that are randomly one of the three classes, so how does that work creating game objects within code. I can’t really grasp creating game objects without manually creating new game objects within the scene editor. I added this here because when I create the game objects I wouldn’t know what type I would create the object.