Main loop is the abstract main loop base class. Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a [code]MainLoop[/code] has to be provided to OS, else the application will exit. This happens automatically (and a [SceneTree] is created), unless a main [Script] is supplied, which may or not create and return a [code]MainLoop[/code]. Called before the program exits. Called each idle frame with time since last call as an only argument. Called once during initialization.