You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tiled 1.9 was recently released. I noticed that one of the changes is renaming the property "type" to "class" for all data types as per the release notes.
Object Types have been merged into the Property Types, now simply called “Custom Types”. This means custom classes can now have a color and can be used as “object type”. If your project refers to an object types file, these types will be automatically imported as custom classes. If you used globally stored object types before, they can be manually imported to your project.
In addition, the “Type” property previously available only for objects and tiles is now available for all data types as the new “Class” property. For consistency, this value is written out as “class” also for objects and tiles, but a project-wide compatibility option is provided to make it still write out as “type”:
This API change shouldn't affect this project today, as I believe the new className property is still accessible as "type" (although marked deprecated), but it might be worth taking note in case it becomes a future issue. As far as I can tell, this would affects us when we want to distinguish which type of Node to create for a given Tiled object.
One consideration is making sure the plugin remains compatible with previous versions of Tiled. We could simply test for the presence of a "className" property on the object and fallback to "type", or we could also test tiled.version to switch behaviors. It's also worth noting that Tiled projects (but not individual maps) now have the ability to save files in "compatibility mode", which keeps the 1.8 API intact, but I'm not sure this would affect us since we are using the export path.
I'm reporting this simply as a TODO. The changes seem simple enough and I'd be happy to contribute if the maintainer would prefer.
The text was updated successfully, but these errors were encountered:
One consideration is making sure the plugin remains compatible with previous versions of Tiled. We could simply test for the presence of a "className" property on the object and fallback to "type", or we could also test tiled.version to switch behaviors.
I think it's good to have this issue as reminder, but currently I don't really see a reason to remove the deprecated properties so there is no need to act on this now.
It's also worth noting that Tiled projects (but not individual maps) now have the ability to save files in "compatibility mode", which keeps the 1.8 API intact, but I'm not sure this would affect us since we are using the export path.
Indeed, this only affects the saved files, not the scripting API.
Tiled 1.9 was recently released. I noticed that one of the changes is renaming the property "type" to "class" for all data types as per the release notes.
This is confirmed by the plugin API documentation.
This API change shouldn't affect this project today, as I believe the new className property is still accessible as "type" (although marked deprecated), but it might be worth taking note in case it becomes a future issue. As far as I can tell, this would affects us when we want to distinguish which type of Node to create for a given Tiled object.
One consideration is making sure the plugin remains compatible with previous versions of Tiled. We could simply test for the presence of a "className" property on the object and fallback to "type", or we could also test
tiled.version
to switch behaviors. It's also worth noting that Tiled projects (but not individual maps) now have the ability to save files in "compatibility mode", which keeps the 1.8 API intact, but I'm not sure this would affect us since we are using the export path.I'm reporting this simply as a TODO. The changes seem simple enough and I'd be happy to contribute if the maintainer would prefer.
The text was updated successfully, but these errors were encountered: