godot-tiled-importer
godot-tiled-importer copied to clipboard
tmx file refused to update in godot. problem is object.type is int
Plugin version
Tiled importer 2.3 from asset library Godot version 3.2.2.stable downloaded from steam
Issue description Map doesn't update in godot because I get error.
When saving tmx file in tiled godot shows this error message:
res://addons/vnen.tiled_importer/tiled_map_reader.gd:945 - Invalid operands 'int' and 'String' in operator '=='
Line 945 in tiled_map_reader.gd is:
if object.type == "navigation" or object.type == "occluder":
If I print object it is:
{height:56, id:1, rotation:0, type:1, visible:True, width:128, x:0, y:0}
Steps to reproduce Don't know what caused it. I was making a new tileset from a image that I used in another tileset becuse I wanted to change the tile height and width. Maybe that had something to do with it.
Sample map or tileset tmxfile.zip
Steps to fix
I made a line before line 945 in tiled_map_reader.gd with the code:
object.type = str(object.type)
and it worked.
Maybe that can cause more problems, I don't know. But its working so far.