Hey guys,
I’m currently working on a game targeting android and ios platforms. I am quite familiar with object pooling and I make sure to instantiate any GameObjects I’m going to create in OnStart() and then cache/reuse them in the scene.
Should I be concerned with newing regular C# objects at runtime as well? Is this something I should avoid doing?
Currently in my game I might do something like this to create a set of badguys:
var badGuys = new List<BadGuy>();
for(int i=0; i<BAD_GUY_COUNT; i++)
{
badGuys.Add(new BadGuy() { hp = 10, attack = 4 });
}
Will this cause performance issues? Should I be creating objects like this at scene start just like any prefabs/GameObjects I need?
Thanks for any feedback on this!