- Home /
scene loading 100's of scenes
this has been asked before.. maybe iv read the wrong questions and didn't understand i'm not quite sure so i maybe wrong on this.. i have created a town consists of houses roads lamp posts.. etc what you'd see in a town..I broke it down into an even 120 pieces by putting the town ontop of a chopped up plane then grouping the objects above the plane to the corrispoding plane below it. so that being said I have 120 pieces that form together to make the town which i'm turning into 120 scenes.. sorry for that explanation I thought id state that part incase i was wrong there too.. so assuming thats right how exactly do i link the scenes so when they load one piece isn't higher up then the next etc etc i'm guessing some height map or something a script reads during the loading.. and i don't want a loading screen i want it to smoothly transition scene to scene as if it was just 1 big scene..
I feel stupid for how long it took me to say that and maybe i wasnt clear in my question.. been a long day.. basicly asking if im creating my scenes correctly by using the planes as a grouping guide and how would be the correct way to load the scenes so its a smooth transition as if it was one big scene. loading the nearest scenes within view distance and unloading the ones out of distance according to z-x location or some such..
bravo on the informative question every bit of info you can give is helpful so don't worry about an apology for the indepth explanation. It is critical to getting a specific answer.
Answer by AngryOldMan · Mar 28, 2011 at 09:49 PM
make sure in one scene that each correctly corrosponding part is loaded in its correct location. For example, say each of these squares is 10 by 10, the 1st square starts at 0,0,0 the next square along wants to be 10,0,0 and so on and so forth, unity keeps the editor view in the exact same place between scenes so you can tell if it's out of place by swaping between scenes to see if it loads up.
What I would personally do is have each square with a trigger area which instantiates the 8 relevant squares around it and destroys any squares that are not in immediate proximity for instance (assumning squares are 10 by 10) by deleting any game object tagged terrain that is over 20 - 30 units away. This means you don;t have 120 messy scenes and that it's all one seemless environment in one scene.(basically nav meshes if you have used UDK or LODing on a sandbox game but a lot less complicated!)
Answer by Justin Warner · Mar 28, 2011 at 09:51 PM
Maybe have a base ground... and ont he ground, have a bunch of markers (Not rendered in the actual game, only shown in editor), and then have a scene for each marker...
So, you get the distance between the player and all the markers every time they move maybe? Might be a lil laggy depending on the amount of markers...
But you get the distance, if it's less than __ you do the additive level load:
http://unity3d.com/support/documentation/ScriptReference/Application.LoadLevelAdditive.html
And it'll make that scene there? I assume that could be how it works? Just make sure the player doesn't see the scenes come to play, make them tall, have trees and what not, you know what I mean...
Great concept idea though... Never thought of it.
Answer by Keld lykke · Apr 18, 2011 at 10:12 PM
At Apex we have used quite some time on making a solution to your problem.
The initial problem we couldn't get around was our memory footprint when loading/unloading scenes with terrains. The solution to that problem was to use asset bundles and make the bundles as small as possible in combination with an asset bundle reference counter.
We now chop terrains into tiles (mesh + terrain collider), LOD the tiles and load/unload them smoothly. However, we could use other kinds of objects as tiles.
Our tool is called ColdScene and you can read about it and try out: ColdScene 0.1 ... ColdScene 0.3.1
Your answer
Follow this Question
Related Questions
Help with error message "Overwriting the same path as another open scene is not allowed" 0 Answers
Bolt Visual scripting and loading different scenes/levels 1 Answer
Load Scene from .unity File 1 Answer
How can I change to next stage when current stage is completed(in case of multiple scenes)? 0 Answers
Cannot close/unload a scene that is open in editor during playmode (using C# code)? 3 Answers