I am making a 2d birds eye view exploration game. (i am new to unity btw) For now my world is a fixed size, and i am using tiles to build the land. the size is 2000x2000 tiles, a big square. each tile is an object and the camera can only see about 25 tiles at a time. so to my question. should I, do I need to destroy the tiles that are far away from my camera and recreate them when the camera is close enough? I ask because I am not sure what Unity will do for me in this case. all tips, help, suggestions, and council is welcome
thanks in advance.
I think this varies. If its the same model/sprite or whatever, the item should batch so its not a big deal.
I would leave it as it is now, and keep an eye on stats when game is running, if fps drops, then maybe look into it
I think you need to consider a different approach to the overall problem.
Sound like you need to use Terrains.
http://docs.unity3d.com/Documentation/Components/script-Terrain.html
Have you considered object pooling? Instead of completely destroying a tile and making a whole new one, you could take an old, and change it to whatever new tile you need. This means you have to make your tile objects changable at runtime, but will keep you from instantiating so many tiles. Just make a class that holds references to tiles that are no longer needed and gives them out when requested.
OK! after running some tests and doing performance and system load testing, object pooling is the way to go. create and destroy are very expensive when compared to just reusing objects. I was looking for quick and dirty at first but object pooling is easy and sophisticated. Not to mention that my first language was C, so I naturally care about memory and its allocation. Thanks a lot to all of you that helped.