-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Make a little overlay to show diagnostics #22486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make a little overlay to show diagnostics #22486
Conversation
|
It looks like your PR has been selected for a highlight in the next release blog post, but you didn't provide a release note. Please review the instructions for writing release notes, then expand or revise the content in the release notes directory to showcase your changes. |
…ake it generic over `DiagnosticPath`
| /// so make sure that the plugin that writes to it is properly set up. | ||
| #[derive(Component)] | ||
| pub struct DiagnosticsOverlay { | ||
| title: Cow<'static, str>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Part of me thinks that we should use the Name component instead, but I won't block on that.
|
I would also note that the log diagnostic plugin can measurably impact performance every time it logs things to the console so having something that doesn't need to do IO is much better to report performance metrics. |
|
@hukasu feel free to resolve conversations when the feedback has been addressed, so we can quickly tell the status of work items when reviewing :) |
|
We don't have a particularly clear story about what Name should / should not be used for right now. Let's leave it out for now, and move forward with this. |
janis-bhm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few non-blocking thoughts:
DiagnosticOverlays with missing DiagnosticOverlayItems show up as "Missing"; maybe it makes sense to hide these entirely? It would mean that removing diagnostics from the engine automatically declutters the diagnostics overlay.
I've also noticed that there is a bit of overlap with the FpsOverlay: notably the Z indices are wildly different even though the intent seems very similar to me, and I think that time graphs like the FpsOverlay has for frame times would be a cool addition to this overlay in the future as well.
Otherwise I think this is a great addition which makes it easy to look at diagnostics at a glance vs scrolling through terminal output.
Objective
LogDiagnosticsPluginprints the values on theDiagnosticStoreto the console, which is spam-y, create an alternative that is visualSolution
Create
RenderAssetsOverlayPluginto create an UI that presents the data for theMaterialAllocatorDiagnosticPlugin::<StandardMaterial>andMeshAllocatorDiagnosticPluginon a draggable and collapsable windowTesting
Enabled it on the
many_foxesexampleShowcase