The application entry point

Hello. I am completely new to Unity development and I have build only few simple projects. The question is: where is application entry point? I mean the real one. Right now I’ve spend some time writing simple scripts in C#, but this code is compiled into .dll’s. I am looking for the global entry point. Like the

int Main(string[] args)

method for normal C# code.
If you have ever dealt with WPF projects, then you know that there is no Main method if you load a Visual Studio default template. Entry point is described in App.xaml page. But you can manually override it and stick with Main method, handle input command line args, global exceptions or whatever. Is it possible in Unity development or we are completely cut off of the application code and have to play with script files and objects?

Thanks in advance.

EDIT: Okay, if I choose WinStore as buid target, Unity generates a WPF project that can be inspected and recompiled. Now I can extract code that calls Unity and use it where I want but still this way is too complicated.

The application entry point is within the engine and you have no access to that. As opposite to when importing some libaray (eg. a rendering engine) into your own project and then instantiating and calling its methods from your code, here it’s the opposite. The engine instantiates your objects based on the data in the scene.

All you can do is to create a class that derives from MonoBehaviour and attach it to the GameObject in the scene, then load the scene. The engine will then call Awake() and Start() and other methods on your class, see MonoBehaviour. MonoBehaviours are the only entry point where your code gets the control.