BsScriptObjectManager.h 698 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include "BsScriptEnginePrerequisites.h"
  3. #include "BsModule.h"
  4. namespace BansheeEngine
  5. {
  6. class BS_SCR_BE_EXPORT ScriptObjectManager : public Module <ScriptObjectManager>
  7. {
  8. public:
  9. ScriptObjectManager();
  10. void registerScriptObject(ScriptObjectBase* instance);
  11. void unregisterScriptObject(ScriptObjectBase* instance);
  12. void refreshAssemblies();
  13. /**
  14. * @brief Triggered right after a domain was reloaded. This signals the outside world that they should
  15. * update any kept Mono references as the old ones will no longer be valid.
  16. */
  17. Event<void()> onRefreshDomainLoaded;
  18. Event<void()> onRefreshComplete;
  19. private:
  20. Set<ScriptObjectBase*> mScriptObjects;
  21. };
  22. }