bevy_ecs_ldtk
bevy_ecs_ldtk copied to clipboard
Can I use ldtk files that reference aseprite files?
I'm working with LDTK files that aren't referencing a PNG atlas, but an aseprite file. This is a pretty cool workflow, because when I save in aseprite, everything is automatically updated in LDTK. I'm struggling to get the LDTK file to work with bevy_ecs_ldtk
though.
There is mdenchev/bevy_aseprite for loading aseprite files, but I don't know how to integrate it. When adding the world with commands.spawn_bundle(LdtkWorldBundle{...
, the assumption seems to be that a tileset is either internal (and therefore forbidden) or external and loading it results in an Handle<Image>
. Is there a way to inject already loaded Handle<Images>
?
I guess it would be nice if there was a crate feature that used bevy_aseprite
to resolve aseprite
files out-of-the-box.
Good suggestion. It is not currently supported. I think it would be a welcome crate feature if it's not too much to maintain.
I'm not really familiar with bevy_aseprite
. It looks like it might only build Handle<TextureAtlas>
s, which makes sense. However, those might not be very accessible to us since Aseprite::atlas
is private.
Then, even if we can access those TextureAtlas
s, I think it will probably have to wait for the new bevy_ecs_tilemap
api. bevy_ecs_tilemap
doesn't accept texture atlases from the user as is.