I need to access directory with levels descriptions in my game.
Gdx.files.internal("data/levels");
On Android it works fine, but on desktop levels
is not recognized as a directory and also list()
returns null. Why it happens and what is the solution? I use maven as my build tool, I've checked that the .jar contains all necessary assets.
I've found hack:
Gdx.files.internal("./bin/data/levels");
but it obviously works only in development environment, which is not satisfactory.