Inter Scene Loading Screen Animation

Hi,
I have implemented a Loading screen animation using GUITextures. I load the next level using Async Loader and check in onGUI that if asyncLoader.isdone is true. The problem is It animates well but then it found isdone = true while scene is not switched completely and screen freezes for just those moments.

Is there a way to overcome this. Can i know when the Actual Scene transition has finished ?

I think showing an animation in a separate thread that persist for both scene might be the solution but i just don’t know how to implement such a thread that can be started parallel when next scene started loading and finish it when the loading is “Actual Finished”.

Can Anyone Help ?

Regards,

You could have a Start script in the newly-loaded level signal that fact.

Here’s a bit of code that might do what you want:

void Start() {
Application.LoadLevel (levelToChange);
}

Now, this is in C#, so you will have to create your own script, but this should help. There are numerous things you can do during this load screen if you want, just include a few method calls.

For example say we want some background music to play, just create another method that will play the audio you wish.

void exampleMusic() {
audio.Play();
}

This is the method you want, you’ll need to create an audio source or something similar, and either have a private variable for an audio clip, or a public, so that way each level loading screen will have unique music.

Well, I found the solution:
Use LoadLevelAsync using Async Operation, but there will always be a switching delay.