use XrSessionCreated schedule to init the Views

Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
Schmarni
2025-02-05 19:00:00 +01:00
parent dcdf362efa
commit 8a3719a019
2 changed files with 18 additions and 9 deletions

View File

@@ -7,7 +7,7 @@ use bevy::ecs::reflect::ReflectComponent;
use bevy::ecs::schedule::IntoSystemConfigs;
use bevy::math::{Mat4, Vec3A};
use bevy::pbr::{PbrPlugin, PbrProjectionPlugin};
use bevy::prelude::Projection;
use bevy::prelude::{Projection, SystemSet};
use bevy::reflect::std_traits::ReflectDefault;
use bevy::reflect::Reflect;
use bevy::render::camera::{CameraProjection, CameraProjectionPlugin};
@@ -38,6 +38,9 @@ impl Plugin for XrCameraPlugin {
}
}
#[derive(Clone, Copy, Default, PartialEq, Eq, Debug, Hash, SystemSet)]
pub struct XrViewInit;
#[derive(Debug, Clone, Reflect, ExtractComponent)]
#[reflect(Component, Default)]
pub struct XrProjection {