pub struct FrameTimeDiagnosticsPlugin;
Expand description
Adds “frame time” diagnostic to an App, specifically “frame time”, “fps” and “frame count”
Implementations§
source§impl FrameTimeDiagnosticsPlugin
impl FrameTimeDiagnosticsPlugin
pub const FPS: DiagnosticId = _
pub const FRAME_COUNT: DiagnosticId = _
pub const FRAME_TIME: DiagnosticId = _
pub fn setup_system(diagnostics: ResMut<'_, Diagnostics>)
pub fn diagnostic_system(
diagnostics: ResMut<'_, Diagnostics>,
time: Res<'_, Time>,
frame_count: Res<'_, FrameCount>
)
Trait Implementations§
source§impl Default for FrameTimeDiagnosticsPlugin
impl Default for FrameTimeDiagnosticsPlugin
source§fn default() -> FrameTimeDiagnosticsPlugin
fn default() -> FrameTimeDiagnosticsPlugin
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for FrameTimeDiagnosticsPlugin
impl Send for FrameTimeDiagnosticsPlugin
impl Sync for FrameTimeDiagnosticsPlugin
impl Unpin for FrameTimeDiagnosticsPlugin
impl UnwindSafe for FrameTimeDiagnosticsPlugin
Blanket Implementations§
§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>
Convert
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
. Read more§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read moresource§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates
Self
using data from the given World