BsScriptObjectManager.h 732 B

1234567891011121314151617181920212223242526272829
  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()> onRefreshStarted;
  19. Event<void()> onRefreshComplete;
  20. private:
  21. Set<ScriptObjectBase*> mScriptObjects;
  22. };
  23. }