private static void Init() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //DualityApp.PluginManager.PluginsReady += DualityApp_PluginsReady; DualityApp.Init( DualityApp.ExecutionContext.Game, new DefaultAssemblyLoader(), null); // Initialize the plugin manager for the editor. We'll use the same loader as the core. pluginManager.Init(DualityApp.PluginManager.AssemblyLoader); // Need to load editor plugins before initializing the graphics context, so the backend is available pluginManager.LoadPlugins(); // Need to initialize graphics context and default content before instantiating anything that could require any of them InitMainGraphicsContext(); DualityApp.InitPostWindow(); //LoadUserData(); pluginManager.InitPlugins(); // Set up core plugin reloader //corePluginReloader = new ReloadCorePluginDialog(mainForm); mainWindow = new MainWindow(); // Register events mainWindow.Activated += mainWindow_Activated; mainWindow.Deactivate += mainWindow_Deactivate; Scene.Leaving += Scene_Leaving; Scene.Entered += Scene_Entered; Application.Idle += Application_Idle; // Enter a new, empty Scene, which will trigger the usual updates //Scene.SwitchTo(null, true); Scene.SwitchTo(new EditorLevelHandler("prince", "04_carrot1n"), true); mainWindow.Show(); Application.Run(); }