BsResourceImporter.h 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include "BsEditorPrerequisites.h"
  3. #include "BsSpecificImporter.h"
  4. namespace BansheeEngine
  5. {
  6. /**
  7. * @brief Imports built-in Banshee resources (marked with .asset extension).
  8. * Essentially just does a pass-through as source asset to import and
  9. * resulting resource are one and the same.
  10. *
  11. * @note This is useful in the project library where we sometimes want to save processed
  12. * resources in the library.
  13. */
  14. class BS_ED_EXPORT ResourceImporter : public SpecificImporter
  15. {
  16. public:
  17. ResourceImporter();
  18. virtual ~ResourceImporter();
  19. /** @copydoc SpecificImporter::isExtensionSupported */
  20. virtual bool isExtensionSupported(const WString& ext) const override;
  21. /** @copydoc SpecificImporter::isMagicNumberSupported */
  22. virtual bool isMagicNumberSupported(const UINT8* magicNumPtr, UINT32 numBytes) const override;
  23. /** @copydoc SpecificImporter::import */
  24. virtual ResourcePtr import(const Path& filePath, ConstImportOptionsPtr importOptions) override;
  25. static const WString DEFAULT_EXTENSION;
  26. };
  27. }