Register Camera types. (#11069)

# Objective

Register and Serialize `Camera3dDepthTextureUsage` and
`ScreenSpaceTransmissionQuality`.

Fixes: #11036

## Solution

Added the relevant derives for reflection and serialization and type
registrations.
This commit is contained in:
Anish Bhobe 2023-12-23 18:33:37 +01:00 committed by GitHub
parent e360763b47
commit 7374e58e78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -64,7 +64,8 @@ impl Default for Camera3d {
}
}
#[derive(Clone, Copy, Reflect)]
#[derive(Clone, Copy, Reflect, Serialize, Deserialize)]
#[reflect(Serialize, Deserialize)]
pub struct Camera3dDepthTextureUsage(u32);
impl From<TextureUsages> for Camera3dDepthTextureUsage {

View file

@ -83,6 +83,8 @@ impl Plugin for Core3dPlugin {
fn build(&self, app: &mut App) {
app.register_type::<Camera3d>()
.register_type::<Camera3dDepthLoadOp>()
.register_type::<Camera3dDepthTextureUsage>()
.register_type::<ScreenSpaceTransmissionQuality>()
.add_plugins((SkyboxPlugin, ExtractComponentPlugin::<Camera3d>::default()))
.add_systems(PostUpdate, check_msaa);