fix(bevy_xr_utils): don't make the mndx_xdev_space plugin crash on startup

Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
Schmarni
2025-07-28 22:13:02 +02:00
committed by Schmarni
parent 90d05e491e
commit 3c360aa74c

View File

@@ -36,7 +36,10 @@ impl Plugin for MonadoXDevSpacesPlugin {
return;
}
app.add_systems(XrSessionCreated, session_created);
app.add_systems(PreUpdate, update_xdev_list);
app.add_systems(
PreUpdate,
update_xdev_list.run_if(resource_exists::<PrimaryXDevList>),
);
app.add_systems(
XrPreDestroySession,
(despawn_xdev_trackers, |mut cmds: Commands| {