Hi again, i'm still figuring out the asset production pipeline (if is an correct term) and i wanted how to register ResourceHandlers, in the EditorSupports seems there's no initialization or register an type to be available for iterating, in my project i've removed all the obsolete resource handlers (since i'm using an completely different third-party renderer) but when i initialize the LoosePackageLoader with my Data folder which contains for now only .txt files, it triggers an assert of there's no resource handler available for this kind of file.
I have an dead-simple resource and ResourceHandler below:
The Resource class:
class DummyResourceHandler;
class HELIUM_STUDIOSUPPORT_API DummyResource : public Resource
{
HELIUM_DECLARE_ASSET(DummyResource, Resource);
friend class DummyResourceHandler;
public:
/// @name Construction/Destruction
//@{
DummyResource();
virtual ~DummyResource();
//@}
virtual Name GetCacheName() const;
};
class HELIUM_STUDIOSUPPORT_API DummyResourceHandler : public ResourceHandler
{
HELIUM_DECLARE_ASSET(DummyResourceHandler, ResourceHandler);
public:
/// @name Construction/Destruction
//@{
DummyResourceHandler();
virtual ~DummyResourceHandler();
//@}
/// @name Resource Handling Support
//@{
virtual const AssetType* GetResourceType() const;
virtual void GetSourceExtensions(const char* const*& rppExtensions, size_t& rExtensionCount) const;
virtual bool CacheResource(AssetPreprocessor* pAssetPreprocessor, Resource* pResource, const String& rSourceFilePath);
//@}
};
And they compile and links fine.
Those objects are defined and declared in the same project, i don't know if can have some issues about that.
In the GetSourceExtensions has the extensions .txt like this:
static const char* extensions[] = { ".txt", ".dummy" };
I tried to search around the Editor code and i saw no ResourceHandler registration, i would appreciate a lot giving me some clues to register resourcehandlers since i'm stuck because the LoosePackageLoader can't find an ResourceHandler for this kind of file.
Thanks you.