Hey guys
This is probably a really simple issue and I might have just overlooked something really simple but I’m having a problem. I would like to load a file using Gdx.files.local. My understanding is that, when used on desktop, it uses the application’s root directory on Desktop. Would I be correct in assuming that the root directory in this scenario is this…?
PROJECT FOLDER (root directory)
- bin
- stuff inside
- libs
- stuff inside
- src
- stuff inside
- res
- t1.png
If I’m seeing this the right way, using Gdx.files.internal(“res/t1.png”) should be returning something other than a NullPointerException, yes? I saw some other thread where the suggested solution was to put files in the Android assets directory, which seems stupid because I don’t want to develop for Android. The strange thing is, while Gdx.files.internal doesn’t seem to find the file, java.io.File.exists(“res/t1.png”) does.
Could anybody shed some light on this situation? It’s annoying me quite a bit.
Thanks.