Appropriate way to force the loading of a particular scene at startup

I’m trying to force the application to load a particular Scene “loading” whenever the player is started.

For this I use a static class like so:

public class Autorun
	static Autorun()
		String levelName = "loading";
		Debug.Log("Autorun will load " + levelName);

Unfortunately the Application.LoadLevel(levelName); seems to be completely ignored.

If this is to be expected I would like to know how I can achieve the Load at startup.

edit: The static constructor is executed at startup. I suspect Application is not ready when I call the LoadLevel which would explain this behaviour. How should I proceed to run my code (save and preferences loading, network queries ad initial scene display) as soon as Application has finished initialising its dependencies?


You don’t need to write code for that. Just add the Loading scene as the first scene in the build window.