x


Load Level in background and load it when key is pressed

Hi, I was looking up at the scripting reference but I not sure how to do this and if it is possible...

I want to enter a level (let's say an intro) and start loading a level in the background (a menu for example). I noticed it is possible to do Applicacion.LoadLevelAsync

However, I want the menu to start loading its assets when the intro starts running but I want to go to the menu not when everything is loaded but when I press a certain button.

Is this possible? How can I do it with c# code? Thank you

more ▼

asked Apr 02 '10 at 03:27 PM

pirulo gravatar image

pirulo
180 3 5 12

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

2 answers: sort oldest

Have you taken a look at this page?

http://unity3d.com/support/documentation/ScriptReference/Application.LoadLevelAsync.html

From what I can tell, when you asynchronously load a level, it doesn't just come up right away... you can tell Unity when to switch to the new level (that was just loaded).

Note that this function requires Unity Pro.

more ▼

answered Apr 02 '10 at 05:40 PM

qJake gravatar image

qJake
11.6k 43 78 161

Thanks. I did check that but it wasn't very helpful. However, I came across this tutorial: http://infiniteunity3d.com/tutorial-coroutines-pt-1-waiting-for-input/

It is good but I cannot figure out how to wait for a key to be pressed while the level is being loaded in the background

Apr 02 '10 at 07:10 PM pirulo
(comments are locked)
10|3000 characters needed characters left

This is currently not possible.

more ▼

answered Apr 16 '10 at 08:32 PM

Horsman gravatar image

Horsman
426 3 6 15

(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:

x455
x348
x329
x109
x107

asked: Apr 02 '10 at 03:27 PM

Seen: 6357 times

Last Updated: Apr 02 '10 at 03:27 PM