BsEditorScriptLibrary.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsScriptEditorPrerequisites.h"
  5. #include "BsEngineScriptLibrary.h"
  6. namespace bs
  7. {
  8. /** @addtogroup EditorScript
  9. * @{
  10. */
  11. /**
  12. * Handles initialization/shutdown of the script systems and loading/refresh of engine and editor-specific assemblies.
  13. */
  14. class BS_SCR_BED_EXPORT EditorScriptLibrary : public EngineScriptLibrary
  15. {
  16. public:
  17. EditorScriptLibrary();
  18. /** @copydoc ScriptLibrary::initialize */
  19. void initialize() override;
  20. /** @copydoc ScriptLibrary::update */
  21. void update() override;
  22. /** @copydoc ScriptLibrary::reload */
  23. void reload() override;
  24. /** @copydoc ScriptLibrary::destroy */
  25. void destroy() override;
  26. /** Returns the absolute path to the built-in managed editor assembly file. */
  27. Path getEditorAssemblyPath() const;
  28. /** Returns the absolute path of the managed editor script assembly file. */
  29. Path getEditorScriptAssemblyPath() const;
  30. /** @copydoc EngineScriptLibrary::getScriptAssemblyFolder */
  31. Path getScriptAssemblyFolder() const override;
  32. /** Returns the singleton instance of this library. */
  33. static EditorScriptLibrary& instance()
  34. {
  35. return static_cast<EditorScriptLibrary&>(*ScriptManager::_getScriptLibrary());
  36. }
  37. private:
  38. bool mScriptAssembliesLoaded;
  39. HEvent mQuitRequestedEvent;
  40. };
  41. /** @} */
  42. }