- Home /
Tiled terrains - where to put, when to load?
Hi,
I have a pretty large tiled terrain (12x12 tiles). As part of the game flow, the user can select a route to follow (like in a routing app, where I say "I want to get from A to B" and the best route is then calculated). Then the gameplay starts.
Now the question: I want to dynamically load the tiles while the user travels along the route. Currently, all tiles are parented to a TerrainManager component which is in my scene. Does this automatically mean that all tiles are loaded into memory when the scene is loaded, even if not active? Put differently, I can imagine two ways of loading only the required tiles:
1) Keep all of them in the scene, but only activate those needed. 2) Keep all tiles as assets in the folder and dynamically add them to the scene as needed.
Of course, 1) would be simpler to implement, but does it work (meaning does it keep only the active tiles in memory)?
Thanks for helping an (almost) newbie.. Hauke