x


Dynamically expanding existing Level by adding "Sub-Levels"

Hi there,

I have an arcade style game, that is if we reduce it to a lower level nothing else than a race from point A to point B.

So everything that is behind the player won't be needed anymore, and everything that is to far away shouldn't be loaded until it is needed.

I want to have the rough structure of the level loaded once completely (curves, straight lines, loopings => "placeholders"), and if the player comes in range of a certain part of the level it gets loaded, and the part behind him gets unloaded.

I tried to do this by using scenes, but I do not like to mark that many objects as "persistant", because actually I have one scene and I am un/loading others into it. There is a breach in my personal sense of logic, because when I load a scene, this scene is the "main" scene I am currently in, but logically this is according to my concept wrong, because what I loaded is just a part of "the level" and not the "level" itself.

Any ideas?

more ▼

asked Nov 24 '10 at 02:43 PM

daemonfire gravatar image

daemonfire
77 8 10 15

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Using scenes is not really appropriate for this usage case. Do you really need anything to be loaded/unloaded? If it's just a matter of performance, Unity's view frustum culling will automatically take care of that. If there are memory issues, then you can instantiate objects with Resources.Load and destroy them when the player goes past.

more ▼

answered Nov 24 '10 at 06:01 PM

Eric5h5 gravatar image

Eric5h5
80.1k 41 132 519

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x322
x263
x75
x66

asked: Nov 24 '10 at 02:43 PM

Seen: 863 times

Last Updated: Nov 24 '10 at 02:43 PM