vnen / godot-tiled-importer

Plugin for Godot Engine to import Tiled Map Editor tilemaps and tilesets
MIT License
850 stars 87 forks source link

Can't import a map if any objects have \n in a custom property #135

Open TeamRobostar opened 3 years ago

TeamRobostar commented 3 years ago

Plugin version Plugin 2.3, from GitHub. Godot 3.2.3 Tiled 1.4.3

Issue description If an object in the map has a custom property containing the newline escape character \n, the map fails to import with the following errors: Missing information in custom properties (around line 0). res://addons/vnen.tiled_importer/tiled_xml_to_dict.gd:111 - Invalid get index 'properties' (on base: 'int'). Tiled Importer: Error parsing map file 'res://Assets/Maps/Example.tmx'. editor/editor_file_system.cpp:1801 - Error importing 'res://Assets/Maps/Example.tmx'.

Steps to reproduce Open a map in Tiled; create an object with a custom property and set it to "Hello\nWorld".

Sample map or tileset

Example.zip

Bauxitedev commented 3 years ago

Running into the same issue here. Trying to switch to JSON instead of XML map file format didn't work either, because somehow custom properties don't even seem to be read at all if the map is in JSON format?