Trouv / bevy_ecs_ldtk

ECS-friendly ldtk plugin for bevy, leveraging bevy_ecs_tilemap
Other
664 stars 75 forks source link

Allow opting out of SpriteSheetBundle grid construction #161

Closed geieredgar closed 1 year ago

geieredgar commented 1 year ago

This is an attempt to fix #105 and fix #151.

This adds an optional no_grid argument to the #[sprite_sheet_bundle] attribute. Instead of using TextureAtlas::from_grid, a TextureAtlas with a single sprite will be used.

Instead of using #[sprite_sheet_bundle(no_grid)], a field of type NoGridSpriteSheetBundle annotated with the #[ldtk_entity] attribute can be used.