Skip to content
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

Supported LDtk version? #191

Closed
Giesch opened this issue May 31, 2023 · 1 comment · Fixed by #203
Closed

Supported LDtk version? #191

Giesch opened this issue May 31, 2023 · 1 comment · Fixed by #203

Comments

@Giesch
Copy link

Giesch commented May 31, 2023

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
Copy link
Owner

Trouv commented Jun 2, 2023

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.

Trouv added a commit that referenced this issue Jul 17, 2023
…projects) (#203)

Closes #191

This rewrites the LDtk serde module from the latest [LDtk quicktype
loader](https://ldtk.io/files/quicktype/LdtkJson.rs). It also simplifies
some of the instructions for rewriting this file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants