Skip to content

Commit

Permalink
Add FromReflect for Visibility (bevyengine#6410)
Browse files Browse the repository at this point in the history
# Objective

- `Visibility` don't have `FromReflect` derive.

## Solution

- Add it.

---

## Changelog

### Added

- `FromReflect` for `Visibility`.
  • Loading branch information
Shatur authored and ItsDoot committed Feb 1, 2023
1 parent aa178e9 commit 87ab7a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_render/src/view/visibility/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use bevy_app::{CoreStage, Plugin};
use bevy_asset::{Assets, Handle};
use bevy_ecs::prelude::*;
use bevy_hierarchy::{Children, Parent};
use bevy_reflect::std_traits::ReflectDefault;
use bevy_reflect::Reflect;
use bevy_reflect::{std_traits::ReflectDefault, FromReflect};
use bevy_transform::components::GlobalTransform;
use bevy_transform::TransformSystem;
use std::cell::Cell;
Expand All @@ -26,7 +26,7 @@ use crate::{

/// If an entity is hidden in this way, all [`Children`] (and all of their children and so on) will also be hidden.
/// This is done by setting the values of their [`ComputedVisibility`] component.
#[derive(Component, Clone, Reflect, Debug)]
#[derive(Component, Clone, Reflect, FromReflect, Debug)]
#[reflect(Component, Default)]
pub struct Visibility {
/// Indicates whether this entity is visible. Hidden values will propagate down the entity hierarchy.
Expand Down

0 comments on commit 87ab7a6

Please sign in to comment.