Instantly share code, notes, and snippets.

Embed
What would you like to do?
package com.example.preloader.gen;
import com.badlogic.gdx.backends.gwt.preloader.DefaultAssetFilter;
public class ExampleAssetFilter extends DefaultAssetFilter {
@Override
public String getBundleName (String file) {
file = file.replace('\\', '/');
if (file.contains("data/levels/")) {
file = file.substring(file.indexOf("data/levels/") + "data/levels/".length());
String bundle = file;
if (file.contains("/")) {
bundle = file.substring(0, file.indexOf("/"));
}
return bundle;
}
return super.getBundleName(file);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment