-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default properties are not imported and show Null
#160
Comments
The main problem is that class-specific information is only stored within the .tiled-project file which currently is not parsed anywhere. As a result, this plugin is unable to set the default values for those. I'd actually expect us not to parse the .tiled-project file but rather on tiled map export, those class default values being auto-populated inside the templates and objects, however, this is currently not the case. This seems to be indeed a bug within the Tiled editor itself: mapeditor/tiled#3411 The only workaround for this is to manually set the attributes on each node, unfortunately. |
The linked bug is only about properties that are classes, Tiled doesn't correctly resolve their members, plain custom properties like the ones in OP's example are correctly resolved with the resolve properties export option in Tiled. The issue in this thread is unrelated. However, OP mentioned the "type" on the object is Lastly, the class (type) information can be exported into JSON and XML files that work the same as objecttypes.xml did in older versions, as well, so if someone wanted to extend the importer to support default values, parsing the entire project is not necessary. |
Plugin version
Tiled Map Importer v2.4
Godot v3.4.stable.official
206ba70f4
Plugin downloaded from github
Issue description
Default or "unmodified" properties from Tiled (ones that are grey) are not imported, showing
Null
Steps to reproduce
Specify a new object type. View->Object Types Editor
Use the object type in a tileset.
Create an object out of that tile (use
Insert Tile
on an object layer)When trying to import level in Godot, the "type" property of the object is
null
When going into the map file and adding and removing a space to make to property no longer grey, the property is imported.
Sample map or tileset
.zip
file containstest-map.tmx
,test-tileset.tsx
,game.gd
andobjecttypes.xml
reproCase.zip
The text was updated successfully, but these errors were encountered: