BsScriptEditorPlugin.cpp 801 B

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