Does anyone know whether OnLevelWasLoaded is called before or after Awake/Start is called on the objects in the level?
- Awake
- Start
- Update begins
Where in an ordered list like that would OnLevelWasLoaded fall?
Thanks in advance!
Does anyone know whether OnLevelWasLoaded is called before or after Awake/Start is called on the objects in the level?
Where in an ordered list like that would OnLevelWasLoaded fall?
Thanks in advance!
function Awake ()
{
Debug.Log (“Awake”);
}
function Start ()
{
Debug.Log (“Start”);
}
function OnLevelWasLoaded ()
{
Debug.Log (“OnLevelWasLoaded”);
}
Console :
Note : If the scene is the first scene, it seems OnLevelWasLoaded do not trigger. This function seems to be triggered only by Application.LoadLevel.
Thanks ![]()
I saw how you did it and then /facepalm’ed myself for even coming to the forums with this one, hehe.
Well, I will simply say Debug.Log ()/ print () are powerful debug tools ![]()