-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
base: main
Are you sure you want to change the base?
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.
| }; | ||
|
|
||
| commands.entity(entity).insert(( | ||
| Node { |
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 think this window would look a bit nicer with slightly rounded corners.
|
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 :) |
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