Im currently looking at using LoadLevelAdditiveAsync to improve loading the large tiled city i dynamically generate by streaming the tiles as the player moves around.
My idea is to have a single scene with a gameobject/script that instantiates the required prefab and sets the tiles rotation(the same tile can have 4 positions) and position plus, any additional street decoration.
I would then call that scene with LoadLevelAdditiveAsync but the problem is how do I pass the prefab/rotation/postion info.
This subject has been discussed before somewhere else that I can’t find right now, but, one way to do it (but I’m not sure how this is going to affect the performance), is to have your whole scene in a parent object, then in a script get a reference to that object using:
GameObject.Find("parentObjectName");
Then manipulate it’s transform rotation/position to how you want it.
The problem you are going to encounter is moving the navmesh and loading the lightmaps.
Unity are working on resolving the lightmap issue, but as for the navmesh, we’ve decided to use the A* Pathfinding Project for creating navmeshes that we will be able to move, and that is working for us so far.
Although I did find some interesting solutions, I was unable to get this to work in the way i wanted.
However in trying out different solutions i discovered that a runaway Co-routine had been happily running in the background slowly but surely causing chaos to my map generation and rendering, sucking up valuable frames for no reason.
WARNING TO ALL or (How to waste a lot of Dev time needlessly)
Co-routines are great but an absolute menace if your not careful. Keep track of them, especially if you are nesting them and don’t use them if you don’t have to. I am working on a sensible way to keep track of all my co-routines so Im not a berk again.