-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Some way to disable FrameTimeDiagnosticsPlugin at runtime #3767
Copy link
Copy link
Closed
Labels
A-DiagnosticsLogging, crash handling, error reporting and performance analysisLogging, crash handling, error reporting and performance analysisC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to use
Description
What problem does this solve or what need does it fill?
Say I'd like to show an FPS counter. Ideally it would use FrameTimeDiagnosticsPlugin, but that means frame metrics will always be tracked (slightly hurting performance).
What solution would you like?
Ideally, FrameTimeDiagnosticsPlugin would only run when I'm showing the FPS counter and be disabled otherwise.
What alternative(s) have you considered?
Copy the code and modify FrameTimeDiagnosticsState to have an enabled flag so it can stop computing frame timings. Ideally, Diagnostics would also have an API to remove entries so memory can be reclaimed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-DiagnosticsLogging, crash handling, error reporting and performance analysisLogging, crash handling, error reporting and performance analysisC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to use