mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Derive Reflect for Exposure (#11907)
# Objective - Don't crash when loading a scene with a camera ## Solution - Derive Reflect for Exposure Closes https://github.com/bevyengine/bevy/issues/11905
This commit is contained in:
parent
80f2ee2910
commit
f81aa64ca4
2 changed files with 3 additions and 1 deletions
|
@ -89,7 +89,8 @@ pub struct ComputedCameraValues {
|
|||
/// How much energy a `Camera3d` absorbs from incoming light.
|
||||
///
|
||||
/// <https://en.wikipedia.org/wiki/Exposure_(photography)>
|
||||
#[derive(Component)]
|
||||
#[derive(Component, Clone, Copy, Reflect)]
|
||||
#[reflect_value(Component)]
|
||||
pub struct Exposure {
|
||||
/// <https://en.wikipedia.org/wiki/Exposure_value#Tabulated_exposure_values>
|
||||
pub ev100: f32,
|
||||
|
|
|
@ -32,6 +32,7 @@ impl Plugin for CameraPlugin {
|
|||
.register_type::<ClearColorConfig>()
|
||||
.register_type::<CameraRenderGraph>()
|
||||
.register_type::<CameraMainTextureUsages>()
|
||||
.register_type::<Exposure>()
|
||||
.init_resource::<ManualTextureViews>()
|
||||
.init_resource::<ClearColor>()
|
||||
.add_plugins((
|
||||
|
|
Loading…
Reference in a new issue