BsEditorScriptLibrary.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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::reload */
  21. void reload() override;
  22. /** @copydoc ScriptLibrary::destroy */
  23. void destroy() override;
  24. /** Returns the absolute path to the built-in managed editor assembly file. */
  25. Path getEditorAssemblyPath() const;
  26. /** Returns the absolute path of the managed editor script assembly file. */
  27. Path getEditorScriptAssemblyPath() const;
  28. /** @copydoc EngineScriptLibrary::getScriptAssemblyFolder */
  29. Path getScriptAssemblyFolder() const override;
  30. /** Returns the singleton instance of this library. */
  31. static EditorScriptLibrary& instance()
  32. {
  33. return static_cast<EditorScriptLibrary&>(*ScriptManager::instance()._getScriptLibrary());
  34. }
  35. private:
  36. bool mScriptAssembliesLoaded;
  37. };
  38. /** @} */
  39. }