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
In the documentation it's stated as only used by the editor so I don't think this library should even try to parse it.
It fails in my project because of this null which was saved by the ldtk:
ERROR bevy_asset::server: Failed to load asset 'gamemap.ldtk' with asset loader 'bevy_ecs_ldtk::assets::ldtk_project::LdtkProjectLoader': unable to deserialize LDtk project: invalid type: null, expected i32 at line 932 column 13
Using bevy v0.12.1, bevy_ecs_ldtk v0.9.0 and ldtk v1.5.3.
The text was updated successfully, but these errors were encountered:
Apparently this can be fixed by simply changing this line:
pub tile_rects_ids:Vec<Vec<i32>>,
into:
pub tile_rects_ids:Vec<Vec<Option<i32>>>,
Not quite sure whether this fix breaks anything else, I simply cloned this repo, changed this line and used the local copy as a dependency in my project.
This plugin bases its ldtk module off of LDtk's quicktype-generated rust types. The quicktype definition seems to think that it shouldn't be optional, even though clearly you've ran into a case where it can be null. So, there's probably a bug upstream.
I don't think this library should even try to parse it.
Good suggestion, I agree. I would like to create a feature flag for enabling these types/fields defined as "editor-only", but it's not the easiest task in the world, especially considering that updates to the ldtk module need to be very repeatable so that they can be re-performed after the quicktype-generated file is updated. It'd be nice to make a script to do it automatically, but I haven't gotten around to it.
In the documentation it's stated as only used by the editor so I don't think this library should even try to parse it.
It fails in my project because of this null which was saved by the ldtk:
Using bevy v0.12.1, bevy_ecs_ldtk v0.9.0 and ldtk v1.5.3.
The text was updated successfully, but these errors were encountered: