Adding an actor to an existing array

Is it possible to add an actor to an existing array of actors in c#?

For context, I’m wanting to make an array containing the enemies that enter a trigger so when the player performs an attack, each enemy in that array will take damage. So for each enemy that enters the trigger, a new actor will be added to that array. Is this possible to do at all? Or is there a much easier way of going about this?

Use a list, a list can be added to without knowing the size in advance:

List<Actor> actorList = new List<Actor>();

Ah, awesome. thank you.

1 Like