Question about Instatiating on iOS

Hello Everyone!!

Working on a little iOS game, and have read that I do not want to instantiate items in my game because the performance goes down.

Instead it was preferred that I store them in the scene with their mesh off until they are called upon…

Can someone give me a quick example of how this is done ?

Thanks!

You use a pooling system. Or store them in an array. Search the array for one that is not used, and use it. A pool manager will automate this for you.

Well, I’ll have to look more into a pooling system I am fairly new and have only been playing around with unity doing projects for web player so not to much experience in what a pooling system is, but i’ll search.

Thanks!

Instantiate everything on startup and position the objects away from cameraview. Then you simply have to have some sort of system to keep track of which objects are free to be positioned back into the game (instead of instantiating new ones) and those who are being used.

Quick hint: hippo mentioned arrays :slight_smile: