OnLevelWasLoaded not called at all

Hello. I have a problem. My project has only one scene. I need get event like OnLevelWasLoaded to apply some additional settings to my game objectst. Unfortunally this method not called at all. I put some breakpoints in debugger to watch execution of this method, but they weren’t called after game starting.
P.S. I start game from editor. May be it will work if i build and run standalone app??
P.P.S Awake methods in the same objects are called, but OnLevelWasLoaded aren’t.

Here some of my code:

public class ConfiguratorFile : MonoBehaviour {

public	void	OnLevelWasLoaded(int level) {
	Debug.Log("Level loaded"); //just for test
	//this method is never called :(
}

public	void	Awake() {
	//this method is called
	//DocumentManager.Instance.LoadFromFile("links.xml"); //singleton
}

}

This scipt is attached to empty gameobject.

alright ,i got the same problem…

i was working on a demo project which only contains one scene

in the editor mode ,OnLevelWasLoaded was not called when i first press play button,then it was called everytime after i used SceneManager.LoadScene(SceneManager.GetActiveScene().name); to reload the scene。

however,in the .exe file i build from this project ,it was called right after the game started.

so here is what i thought, in editor when we start the scene ,the environment is diffent from the real game environment,and the editor doesn’t consider this as a new scene loaded。

to prove this ,i add a new scene which only contains a camera ,and add a script with this:

void Start()
{
    SceneManager.LoadScene("main");
}

“main” was the name of my previous scene,so when the new scene loaded ,it just load my main scene. this time ,OnLevelWasLoaded was called as it should be.

don’t know why they design it this way,hope this will help you.

as far as i know OnLevelWasLoaded will not be called when you just start the game.

I have the same problem. Create new project → Add empty object with such script:

    	void Awake ()
    	{
    		print ("Awake");
    	}
    
    	void OnLevelWasLoaded (int index)
    	{
    		print ("OnLevelWasLoaded with index " + index);
    	}

When I run it in editor OnLevelWasLoaded is not invoked on start, but when I build exe file it is. It looks strange and must be a bug. Actually I faced with this problem in roguelike-2d tutorial when tried to test build.