godot-LDtk-import icon indicating copy to clipboard operation
godot-LDtk-import copied to clipboard

Not able to import tilemap images

Open blabtonic opened this issue 2 years ago • 1 comments

Error given is in Godot 3.5.stable: res://addons/LDtk-Importer/LDtk.gd:189 - Invalid get index 'autoTilesetDefUid' (on base: 'Dictionary').

I have all the tilemaps set and the IntGrid map name is: Collisions even in the test-example provided in the repo if I draw a new map in GridVania mode the example fails

blabtonic avatar Feb 18 '23 23:02 blabtonic

In the functionget_layer_tileset_data()

#get layer tileset_data by layerDefUid.
func get_layer_tileset_data(layerDefUid):
	var tilesetId
	for layer in map_data.defs.layers:
		if layer.uid == layerDefUid:
			match layer.__type:
				'AutoLayer', 'IntGrid':
					tilesetId = layer.autoTilesetDefUid
				'Tiles':
					tilesetId = layer.tilesetDefUid

if I set tileSetId = layer.autoTilesetDefUid to layer.tilesetDefUid I am able to get the tilemaps to show up with the collisions. Not sure if thats because I am using a newer version of ldtk to create the level. I am using LDTK 1.2.5

blabtonic avatar Feb 19 '23 01:02 blabtonic