Program.cs 857 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using System.Collections.Generic;
  3. using BansheeEngine;
  4. namespace BansheeEditor
  5. {
  6. class Program
  7. {
  8. private static EditorApplication app;
  9. static void OnInitialize()
  10. {
  11. app = new EditorApplication();
  12. }
  13. static void OnEditorLoad()
  14. {
  15. if (EditorSettings.AutoLoadLastProject)
  16. {
  17. string projectPath = EditorSettings.LastOpenProject;
  18. if (EditorApplication.IsValidProject(projectPath))
  19. EditorApplication.LoadProject(projectPath);
  20. else
  21. ProjectWindow.Open();
  22. }
  23. else
  24. ProjectWindow.Open();
  25. }
  26. static void OnEditorUpdate()
  27. {
  28. app.OnEditorUpdate();
  29. }
  30. }
  31. }