BsEditorScriptManager.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #pragma once
  2. #include "BsScriptEditorPrerequisites.h"
  3. #include "BsModule.h"
  4. namespace BansheeEngine
  5. {
  6. /**
  7. * @brief Handles all editor script modules, updates editor windows and similar.
  8. */
  9. class BS_SCR_BED_EXPORT EditorScriptManager : public Module<EditorScriptManager>
  10. {
  11. public:
  12. EditorScriptManager();
  13. ~EditorScriptManager();
  14. /**
  15. * @brief Called every frame. Updates editor windows and script modules.
  16. *
  17. * @note Internal method.
  18. */
  19. void update();
  20. private:
  21. /**
  22. * @brief Triggers Program::OnInitialize callback. Should be called
  23. * after startup and after assembly reload.
  24. */
  25. void triggerOnInitialize();
  26. /**
  27. * @brief Triggered when an assembly refreshed finished.
  28. */
  29. void onAssemblyRefreshDone();
  30. /**
  31. * @brief Loads all managed types and methods used by this module.
  32. */
  33. void loadMonoTypes();
  34. static const float EDITOR_UPDATE_RATE;
  35. MonoAssembly* mEditorAssembly;
  36. float mLastUpdateTime;
  37. MonoClass* mProgramEdClass;
  38. MonoMethod* mUpdateMethod;
  39. HEvent mOnDomainLoadConn;
  40. HEvent mOnAssemblyRefreshDoneConn;
  41. };
  42. }