Hi all,
I’ve been getting to grips with using libgdx to develop my game, but as I’m only creating this for desktop, I’m using a single project rather than the default split of base game / desktop project / android project. Now I’ve been trying to use the following line to load a textureatlas:
atlas = new TextureAtlas(Gdx.files.internal("assets/packed/game.atlas"));
where the ‘assets’ directory is in the root of the project directory. However running this code just gives me a NullPointerException. From what I can gather though, GDX.files.internal is expecting there to be an assets folder in the android project directory - which I’m not using.
So my question is, how can I correctly reference and load a local file in my project? Thanks.