Hi, I’ve been searching for about a week now but can’t quite figure out an elegant solution to my problem.
I’d like to instantiate a gameobject from various pools only if there is a gameobject in the pools that is currently inactive.
For example, if there is a population number (300) and I have 250 active gameobjects from that population, how might I enable one but not spawn one if the population is 300. Again, I’m using different pools (young, middle-aged, old) and want to make sure that I don’t disable active game objects. I’m working with hundreds of gameobjects and want to be as performant as possible but I’m running into a mental block on this and appreciate any general guidance available. I think I’m misunderstanding something very basic because it seems that making a population int and comparing it every time is not as straight-forward as it could be.
Thank you.