levigilbert / godot-LDtk-import

Basic GDscript for importing LDtk files into the Godot game engine.
MIT License
129 stars 15 forks source link

Showing no tiles on collision layer. #28

Open HollyEye opened 1 year ago

HollyEye commented 1 year ago

Hi, im using Godot 3.5 and Ldtk 1.2.5 and after the update of ldtk to the latest update (1.2.5) the collision layer is not showing any tiles. Any fix for that? NoTiles

blabtonic commented 1 year ago

I am experiencing the same issue https://github.com/levigilbert/godot-LDtk-import/issues/27 What I did on my end was edit the LDTK.gd

I edited on line 189 and changed

tilesetId = layer.autoTilesetDefUid

to

tilesetId = layer.TilesetDefUid

don't think this is a proper solution but I got the tilemap images to show up

notetell commented 1 year ago

So I encountered similar problem. I saved the project.ldtk file in LDTK editor, opened it in Godot 3.5.2 with godot-LDtk-import plugin, but scene only had collisions without graphics.

I ended up opening project.ldtk file, navigating to section that had the name of tile set (SunnyLand_by_Ansimuz-extended.png in my case) and changing option "relPath" to "relPath": "SunnyLand_by_Ansimuz-extended.png" (I put the .png in the same folder as the imported scene). With importing the new .ldtk and saving the scene as .tscn the tiles were displayed properly.