You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created my .tmx map using the editor "Tiled" and i noticed that the TmxMapLoader does not support tmx files that were created using multiple images instead of a single tileset image.
If it's not clear what i'm referring to, i post a screenshot:
Examining the first lines of two tmx files created in both way there is one difference:
(Created from a single image tileset)
(Created from multiple images)
Debugging my application, a NullPointerException was thrown and this was the stack trace:
Exception in thread "LWJGL Application" java.lang.NullPointerException
at com.badlogic.gdx.maps.tiled.TmxMapLoader.loadTilesets(TmxMapLoader.java:246)
at com.badlogic.gdx.maps.tiled.TmxMapLoader.load(TmxMapLoader.java:118)
at com.badlogic.gdx.maps.tiled.TmxMapLoader.load(TmxMapLoader.java:104)
So i went into the code and noticed that in the method "TmxMapLoader.loadTilesets" it tries to get the attribute "source" from the tileset 's child but tileset does not have a child image in the case that was created from multiple images.
The text was updated successfully, but these errors were encountered:
I created my .tmx map using the editor "Tiled" and i noticed that the TmxMapLoader does not support tmx files that were created using multiple images instead of a single tileset image.
If it's not clear what i'm referring to, i post a screenshot:
Examining the first lines of two tmx files created in both way there is one difference:
(Created from a single image tileset)
(Created from multiple images)
Debugging my application, a NullPointerException was thrown and this was the stack trace:
Exception in thread "LWJGL Application" java.lang.NullPointerException
at com.badlogic.gdx.maps.tiled.TmxMapLoader.loadTilesets(TmxMapLoader.java:246)
at com.badlogic.gdx.maps.tiled.TmxMapLoader.load(TmxMapLoader.java:118)
at com.badlogic.gdx.maps.tiled.TmxMapLoader.load(TmxMapLoader.java:104)
So i went into the code and noticed that in the method "TmxMapLoader.loadTilesets" it tries to get the attribute "source" from the tileset 's child but tileset does not have a child image in the case that was created from multiple images.
The text was updated successfully, but these errors were encountered: