- Home /
Object pooling vs Instantiate for relatively small amount of objects
I have a scene with 10 platforms and about 30 obstacles on them.
Should I instantiate the platforms and the obstacles and destroy them when they are behind the player (outside of the camera).
Should I use object pooling or just re-position the inactive platforms/obstacles according to the camera view.
Is the memory not fully freed even after the reloading of the scene? Because if the memory is freed, 40-50 objects instantiated and destroyed seems like no big deal (they are primitives - cubes, spheres etc.). I was reading a lot on forums and there were some tests done by other people, however I can't make a conclusion.
P. S. I am reloading the same scene and just increasing the "level" count. I am making the game for mobile. The game is 3D.
Your answer
Follow this Question
Related Questions
Can't seem to destroy instantiated objects. 1 Answer
Can a Network.Instantiate()'d object be Object.Destroy()'d? 0 Answers
Checking Instantiate/Destroy has been called | Checking number of scene GameObjects 1 Answer
Proper/Best way to Instantiate and Destroy with Unity Networking? 2 Answers
instantiate,destroy,gain speed in time 2 Answers