Hi everyone,
I’m developping a 2d plateformer (Yet an other one, yep …). It’s working fine with an infinite level (the plateforme are instanciated on the fly and destroyed shortly after).
Now i want to make custom levels. I have a nice script reader able to instanciate everthings i need. I’m aiming for mobile so i don’t have much memory and as i have unity basic i don’t have the profiler.
What is my best option between :
-
Don’t mind :
Instanciate everythings in the beginning and never destroy them. -
Instanciate on the fly and destroy : when the player approachs an obstacle, i instantiate it on the fly. Sometimes i check for every object, test the distance from the player and destroy it if they are too far.
-
Instanciate on the fly and disable: when the player approachs an obstacle, i instantiate it on the fly. Sometimes i check for every object, test the distance from the player and disable them it if they are too far.