Enum bevy::render::view::visibility::Visibility
pub enum Visibility {
Inherited,
Hidden,
Visible,
}
Expand description
User indication of whether an entity is visible. Propagates down the entity hierarchy.
If an entity is hidden in this way, all Children
(and all of their children and so on) who
are set to Inherited
will also be hidden.
This is done by the visibility_propagate_system
which uses the entity hierarchy and
Visibility
to set the values of each entity’s ComputedVisibility
component.
Variants§
Inherited
An entity with Visibility::Inherited
will inherit the Visibility of its Parent
.
A root-level entity that is set to Inherited
will be visible.
Hidden
An entity with Visibility::Hidden
will be unconditionally hidden.
Visible
An entity with Visibility::Visible
will be unconditionally visible.
Note that an entity with Visibility::Visible
will be visible regardless of whether the
Parent
entity is hidden.
Trait Implementations§
§impl Clone for Visibility
impl Clone for Visibility
§fn clone(&self) -> Visibility
fn clone(&self) -> Visibility
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Component for Visibilitywhere
Visibility: Send + Sync + 'static,
impl Component for Visibilitywhere Visibility: Send + Sync + 'static,
type Storage = TableStorage
§impl Debug for Visibility
impl Debug for Visibility
§impl Default for Visibility
impl Default for Visibility
§fn default() -> Visibility
fn default() -> Visibility
§impl Enum for Visibility
impl Enum for Visibility
§fn field(&self, __name_param: &str) -> Option<&(dyn Reflect + 'static)>
fn field(&self, __name_param: &str) -> Option<&(dyn Reflect + 'static)>
§fn field_at(&self, __index_param: usize) -> Option<&(dyn Reflect + 'static)>
fn field_at(&self, __index_param: usize) -> Option<&(dyn Reflect + 'static)>
§fn field_mut(
&mut self,
__name_param: &str
) -> Option<&mut (dyn Reflect + 'static)>
fn field_mut( &mut self, __name_param: &str ) -> Option<&mut (dyn Reflect + 'static)>
§fn field_at_mut(
&mut self,
__index_param: usize
) -> Option<&mut (dyn Reflect + 'static)>
fn field_at_mut( &mut self, __index_param: usize ) -> Option<&mut (dyn Reflect + 'static)>
§fn index_of(&self, __name_param: &str) -> Option<usize>
fn index_of(&self, __name_param: &str) -> Option<usize>
§fn name_at(&self, __index_param: usize) -> Option<&str>
fn name_at(&self, __index_param: usize) -> Option<&str>
§fn iter_fields(&self) -> VariantFieldIter<'_> ⓘ
fn iter_fields(&self) -> VariantFieldIter<'_> ⓘ
§fn variant_name(&self) -> &str
fn variant_name(&self) -> &str
§fn variant_index(&self) -> usize
fn variant_index(&self) -> usize
§fn variant_type(&self) -> VariantType
fn variant_type(&self) -> VariantType
fn clone_dynamic(&self) -> DynamicEnum
§fn is_variant(&self, variant_type: VariantType) -> bool
fn is_variant(&self, variant_type: VariantType) -> bool
§fn variant_path(&self) -> String
fn variant_path(&self) -> String
§impl FromReflect for Visibility
impl FromReflect for Visibility
§fn from_reflect(__param0: &(dyn Reflect + 'static)) -> Option<Visibility>
fn from_reflect(__param0: &(dyn Reflect + 'static)) -> Option<Visibility>
Self
from a reflected value.§impl GetTypeRegistration for Visibility
impl GetTypeRegistration for Visibility
§impl PartialEq<&Visibility> for Visibility
impl PartialEq<&Visibility> for Visibility
§fn eq(&self, other: &&Visibility) -> bool
fn eq(&self, other: &&Visibility) -> bool
self
and other
values to be equal, and is used
by ==
.§impl PartialEq<Visibility> for &Visibility
impl PartialEq<Visibility> for &Visibility
§fn eq(&self, other: &Visibility) -> bool
fn eq(&self, other: &Visibility) -> bool
self
and other
values to be equal, and is used
by ==
.§impl PartialEq<Visibility> for Visibility
impl PartialEq<Visibility> for Visibility
§fn eq(&self, other: &Visibility) -> bool
fn eq(&self, other: &Visibility) -> bool
self
and other
values to be equal, and is used
by ==
.§impl Reflect for Visibility
impl Reflect for Visibility
§fn get_type_info(&self) -> &'static TypeInfo
fn get_type_info(&self) -> &'static TypeInfo
§fn into_any(self: Box<Visibility, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<Visibility, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Any>
.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut dyn Any
.§fn into_reflect(
self: Box<Visibility, Global>
) -> Box<dyn Reflect + 'static, Global>
fn into_reflect( self: Box<Visibility, Global> ) -> Box<dyn Reflect + 'static, Global>
§fn as_reflect(&self) -> &(dyn Reflect + 'static)
fn as_reflect(&self) -> &(dyn Reflect + 'static)
§fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
§fn clone_value(&self) -> Box<dyn Reflect + 'static, Global>
fn clone_value(&self) -> Box<dyn Reflect + 'static, Global>
Reflect
trait object. Read more§fn set(
&mut self,
__value_param: Box<dyn Reflect + 'static, Global>
) -> Result<(), Box<dyn Reflect + 'static, Global>>
fn set( &mut self, __value_param: Box<dyn Reflect + 'static, Global> ) -> Result<(), Box<dyn Reflect + 'static, Global>>
§fn apply(&mut self, __value_param: &(dyn Reflect + 'static))
fn apply(&mut self, __value_param: &(dyn Reflect + 'static))
§fn reflect_ref(&self) -> ReflectRef<'_>
fn reflect_ref(&self) -> ReflectRef<'_>
§fn reflect_mut(&mut self) -> ReflectMut<'_>
fn reflect_mut(&mut self) -> ReflectMut<'_>
§fn reflect_owned(self: Box<Visibility, Global>) -> ReflectOwned
fn reflect_owned(self: Box<Visibility, Global>) -> ReflectOwned
§fn reflect_hash(&self) -> Option<u64>
fn reflect_hash(&self) -> Option<u64>
§fn reflect_partial_eq(&self, value: &(dyn Reflect + 'static)) -> Option<bool>
fn reflect_partial_eq(&self, value: &(dyn Reflect + 'static)) -> Option<bool>
§fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>
§fn serializable(&self) -> Option<Serializable<'_>>
fn serializable(&self) -> Option<Serializable<'_>>
§impl Typed for Visibility
impl Typed for Visibility
impl Copy for Visibility
impl Eq for Visibility
impl StructuralEq for Visibility
impl StructuralPartialEq for Visibility
Auto Trait Implementations§
impl RefUnwindSafe for Visibility
impl Send for Visibility
impl Sync for Visibility
impl Unpin for Visibility
impl UnwindSafe for Visibility
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
impl<T, U> AsBindGroupShaderType<U> for Twhere U: ShaderType, &'a T: for<'a> Into<U>,
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.§impl<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere C: Component,
fn component_ids( components: &mut Components, storages: &mut Storages, ids: &mut impl FnMut(ComponentId) )
unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> Cwhere F: for<'a> FnMut(&'a mut T) -> OwningPtr<'a, Aligned>,
fn get_components( self, func: &mut impl FnMut(StorageType, OwningPtr<'_, Aligned>) )
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Self
using data from the given World§impl<T> GetPath for Twhere
T: Reflect,
impl<T> GetPath for Twhere T: Reflect,
§fn reflect_path<'r, 'p>(
&'r self,
path: &'p str
) -> Result<&'r (dyn Reflect + 'static), ReflectPathError<'p>>
fn reflect_path<'r, 'p>( &'r self, path: &'p str ) -> Result<&'r (dyn Reflect + 'static), ReflectPathError<'p>>
path
. Read more§fn reflect_path_mut<'r, 'p>(
&'r mut self,
path: &'p str
) -> Result<&'r mut (dyn Reflect + 'static), ReflectPathError<'p>>
fn reflect_path_mut<'r, 'p>( &'r mut self, path: &'p str ) -> Result<&'r mut (dyn Reflect + 'static), ReflectPathError<'p>>
path
. Read more