-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Map properties defined in a custom class are not saved #3470
Comments
Adding a custom property directly to the map (not using the class) that property will be stored. |
This is expected behaviour: only properties with overridden values are saved. This both saves space by avoiding storing defaults, and allows Tiled to distinguish between overridden and non-overridden values. If you want to include the default values in the map, you can enable the "resolve object types and properties" export setting, and export the map. |
Understood. I would do it the same way for pure saving purposes. But... Unfortunately using the option "Resolve object types and properties" during export does NOT work as expected either.
|
Oh dear. Until 1.8, only Objects and Tiles had custom properties and that export option resolved them, and that feature hasn't been updated to reflect the new changes (nested properties and classes on things other than Objects and Tiles). Nested properties not resolving is issue #3411. Please consider editing this issue to reflect the fact that this export option doesn't work for things other than Objects and Tiles, as that's an actual issue that needs fixing, and which would resolve your original issue. The resolve properties export option is what you're expected to use if you need defaults included with your maps. |
Thanks for the bug report @ChristianPervoelz! The fix will be in Tiled 1.9.2, and of course the next build. :-) |
Describe the bug
When having a custom type class (containing properties) set to be the class type of a new map, the defined properties and their values are not stored while saving (except when modified manually)
To Reproduce
Steps to reproduce the behavior:
a. Set 'Class of' to 'Map' only
b. add a property to the class (e.g. of type float)
As a result the property defined in the new class will be shown with its default value in the 'Custom Properties' section of the map properties.
Result:
The tmx file does not contain a properties section for the map
This might be OK, when opening the map later on with Tiled only, but when loading it with an external tool, that has no access to the project settings (where custom types are stored) all the information stored in the custom properties will miss.
Workaround
Change the values of each custom property manually and then change it back to its default value.
Expected behavior
Custom properties are stored into the saved map no matter they are changed or not, as well as into a may exported map.
Specifications:
The text was updated successfully, but these errors were encountered: