BsScriptEditorPlugin.cpp 855 B

12345678910111213141516171819202122232425262728
  1. #include "BsScriptEditorPrerequisites.h"
  2. #include "BsScriptEditorWindow.h"
  3. #include "BsMonoManager.h"
  4. #include "BsMonoAssembly.h"
  5. using namespace CamelotFramework;
  6. using namespace BansheeEngine;
  7. namespace BansheeEditor
  8. {
  9. extern "C" BS_SCR_BED_EXPORT const String& getPluginName()
  10. {
  11. static String pluginName = "SBansheeEditor";
  12. return pluginName;
  13. }
  14. extern "C" BS_SCR_BED_EXPORT void* loadPlugin()
  15. {
  16. const CM::String ENGINE_ASSEMBLY_PATH = "..\\..\\Assemblies\\MBansheeEditor.dll";
  17. const CM::String ENGINE_ASSEMBLY_NAME = "MBansheeEditor";
  18. const CM::String ASSEMBLY_ENTRY_POINT = "ProgramEd::Main";
  19. BS::MonoAssembly& assembly = MonoManager::instance().loadAssembly(ENGINE_ASSEMBLY_PATH, ENGINE_ASSEMBLY_NAME, ASSEMBLY_ENTRY_POINT);
  20. ScriptEditorWindow::registerManagedEditorWindows();
  21. return nullptr;
  22. }
  23. }