We have implemented game object pools so we don’t have to factory.create() and go.delete() instances so frequently during play.
Sometimes the pools can grow considerably in size so we can have a lot of instances created (some being inactive). There is a hard limit for max_instances in the project settings so we are forced to bump this number up to reduce the chances of reaching that limit.
We can find out the limit from script via sys.get_config(“colelction.max_instances”)
The Question is: Is there a similar method we can call from script to determine the current number of instances?
We want to know determine when we are approaching the limit so we can either release resources from out pools, or fallback to a standard factory_create() and delete() methods.
Similarly want to be able to query the engine for the current amount of sprites, spines, collectionfactories, gameobject factories, colelction proxy, etc. Because these all have hard limits set in the engine and we would like to be able to track this during game sessions.