apoligies if formatting is bad, on phone.
i have an enemy class, with subclasses of different enemy types. I initialize them in a different script called enemyspawner, with
Enemy<EnemyType> enemy = new Enemy<EnemyType>("Enemy Name");
I want to have the enemy spawner script spawn random enemies from a list, but im not sure how I would have to do it. I tried a string list, like
Enemy<StringName[0]>
but it does not accept strings, only types. i thought of just having If statements for each different enemy type, but that gets annoying every time I want to make a new enemy type.
what ways can i go about this?