mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Unignore Camera.target
field for reflection (#14367)
# Objective - The `RenderTarget` type wasn't being registered, and the `target` field of `Camera` was marked as ignored, so it wasn't inspectable by editors. ## Solution - Remove `#[reflect(ignore)]` from the field - I've also reordered the `Default` impl of `RenderTarget` because it looked like it belonged to a different type
This commit is contained in:
parent
e06f4d4083
commit
4ea8c66321
1 changed files with 6 additions and 7 deletions
|
@ -211,7 +211,6 @@ pub struct Camera {
|
|||
#[reflect(ignore)]
|
||||
pub computed: ComputedCameraValues,
|
||||
/// The "target" that this camera will render to.
|
||||
#[reflect(ignore)]
|
||||
pub target: RenderTarget,
|
||||
/// If this is set to `true`, the camera will use an intermediate "high dynamic range" render texture.
|
||||
/// This allows rendering with a wider range of lighting values.
|
||||
|
@ -541,6 +540,12 @@ pub enum RenderTarget {
|
|||
TextureView(ManualTextureViewHandle),
|
||||
}
|
||||
|
||||
impl Default for RenderTarget {
|
||||
fn default() -> Self {
|
||||
Self::Window(Default::default())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Handle<Image>> for RenderTarget {
|
||||
fn from(handle: Handle<Image>) -> Self {
|
||||
Self::Image(handle)
|
||||
|
@ -561,12 +566,6 @@ pub enum NormalizedRenderTarget {
|
|||
TextureView(ManualTextureViewHandle),
|
||||
}
|
||||
|
||||
impl Default for RenderTarget {
|
||||
fn default() -> Self {
|
||||
Self::Window(Default::default())
|
||||
}
|
||||
}
|
||||
|
||||
impl RenderTarget {
|
||||
/// Normalize the render target down to a more concrete value, mostly used for equality comparisons.
|
||||
pub fn normalize(&self, primary_window: Option<Entity>) -> Option<NormalizedRenderTarget> {
|
||||
|
|
Loading…
Reference in a new issue