Trouv / bevy_ecs_ldtk

ECS-friendly ldtk plugin for bevy, leveraging bevy_ecs_tilemap
Other
641 stars 73 forks source link

Supported LDtk version? #191

Closed Giesch closed 1 year ago

Giesch commented 1 year ago

I encountered this error when trying to load a level using an entity ref field with an allowed ref of 'OnlySpecificEntity'. I got this error when loading the level with bevy_ecs_ldtk:

2023-05-31T16:04:44.584407Z  WARN bevy_asset::asset_server: encountered an error while loading an asset: unknown variant `OnlySpecificEntity`, expected one of `Any`, `OnlySame`, `OnlyTags` at line 547 column 40

I'm using LDtk 1.3.3, which is apparently pretty recent. It looks like that variant was just added: https://github.com/deepnight/ldtk/blame/master/docs/JSON_SCHEMA.json#L1000

Is LDtk 1.3.0 the supported version? What would be necessary to support 1.3.3?

Trouv commented 1 year ago

Thanks for bringing this to my attention. It's not too difficult to support new versions when breaking changes happen, it's just sometimes difficult to determine whether or not a breaking change occurred. LDtk uses quicktype to autogenerate types for many languages, including rust. So, it's mostly a matter of merging the changes there to this repository in src/ldtk/mod.rs, and noting in the README.md that we no longer support older versions than that. I'll make sure to do this before releasing a new version of the plugin if nobody else does it first.