Skip to content Skip to sidebar Skip to footer

Libgdx AssetsManager - Sounds Loaded But "Not Loaded Error"?

When using LibGDX's AssetsManager, I've implement an AssetsManager for managing Sounds, and made it global. The files are all located within ../data/sounds/.* (example: ../data/sou

Solution 1:

I believe that in your play method, you are calling AssetManager.get on the key rather than its value in currentPackage. I think a correct play method would be:

public static boolean play(String file) {
    if(currentPackage.containsKey(file)) {
        sound = s_manager.get(currentPackage.get(file), Sound.class);
        sound.play();
        return true;
    }
    return false;
}

Post a Comment for "Libgdx AssetsManager - Sounds Loaded But "Not Loaded Error"?"