Trouv / bevy_ecs_ldtk

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

feat: Add LevelSet::from_iid #144

Closed johanhelsing closed 1 year ago

johanhelsing commented 1 year ago

If you want to spawn multiple levels at once and handle loading unloading yourself (not using global resources), it's useful to be able to do things like this:

commands.spawn(LdtkWorldBundle {
    ldtk_handle: asset_server.load("levels.ldtk"),
    level_set: LevelSet::from_iid("58e02ac0-5110-11ed-b070-cdccc74eaccd"),
    ..default()
})