I'm trying to make a general plugin for serializing/deserializing things, but when i try to add ComputedVisiblityFlag to the type registry:
use bevy::{prelude::*, core_pipeline::core_3d::Camera3dDepthTextureUsage, render::view::ComputedVisibilityFlags};
... in plugin block
app.register_type::<ComputedVisibilityFlags>()
I get the error:
struct `ComputedVisibilityFlags` is private
private struct
bitflags::bitflags! {
#[derive(Clone, Debug, Eq, PartialEq)]
pub(super) struct ComputedVisibilityFlags: u8 {
const VISIBLE_IN_VIEW = 1 << 0;
const VISIBLE_IN_HIERARCHY = 1 << 1;
}
}
bevy_reflect::impl_reflect_value!((in bevy_render::view) ComputedVisibilityFlags);
/// Algorithmically-computed indication of whether an entity is visible and should be extracted for rendering
#[derive(Component, Clone, Reflect, Debug, Eq, PartialEq)]
#[reflect(Component, Default)]
pub struct ComputedVisibility {
flags: ComputedVisibilityFlags,
}