BsFontPlugin.cpp 569 B

1234567891011121314151617181920212223242526
  1. #include "BsFontPrerequisites.h"
  2. #include "BsImporter.h"
  3. #include "BsFontImporter.h"
  4. namespace BansheeEngine
  5. {
  6. /**
  7. * @brief Returns a name of the plugin.
  8. */
  9. extern "C" BS_FONT_EXPORT const String& getPluginName()
  10. {
  11. static String pluginName = "FontImporter";
  12. return pluginName;
  13. }
  14. /**
  15. * @brief Entry point to the plugin. Called by the engine when the plugin is loaded.
  16. */
  17. extern "C" BS_FONT_EXPORT void* loadPlugin()
  18. {
  19. FontImporter* importer = bs_new<FontImporter>();
  20. Importer::instance()._registerAssetImporter(importer);
  21. return nullptr;
  22. }
  23. }