[Solved] Register new asset extension with existing assetLoader

Hi

I have a file type, which is basically bmp renamed to bm2. Can I register the bm2 extension with the AssetLoader already present for bmp-files?

Kind regards

Ps. Got this so far:

private void addbm2AssetLoader(AssetManager assets) {
        assets.registerLoader(bm2Loader.class, "bm2");
}
    
private class bm2Loader implements AssetLoader{

    bm2Loader(){
            
    }
        
    @Override
    public Object load(AssetInfo assetInfo) throws IOException {
        AssetKey key = assetInfo.getKey();
            
        //Call load for bmp files? 
        return null;
    }
}

you don’t need to do that. Just register the file extension with the regular image loader (AWTLoader; assuming you’re on desktop)

assetManager.registerLoader(AwtLoader.class, "bm2");

Thanks.