Is there anything like OnLevelChanged() in unity?

Hi,

Is there any function like OnLevelChanged() in unity that called before loading a new level?

Thanks in advance.

It's not physically possible to have callbacks on events that haven't happened yet. Since Unity has no idea that you intend to load a level at some point in the future (even if it's just the next frame), you'll have to notify objects yourself.

i think it is this :

function OnLevelWasLoaded () {
     //do stuff here
}

here is the link in the scripting page