Path: blob/main/release-content/release-notes/diagnostics_overlay.md
9309 views
------You can now visualize values from the DiagnosticStore using a DiagnosticsOverlay window.
An overlay can be built by spawning an entity with the [DiagnosticsOverlay] component passing your custom [DiagnosticPath] list or using one of the provided presets.
By default the overlay will display the smoothed moving average for the diagnostic, but you can also visualize the latest value or the moving average by passing [DiagnosticsOverlayStatistic]. The floating point precision can also be configured through the [DiagnosticsOverlayItem::precision] field.
All [DiagnosticsOverlay] will be managed by the [DiagnosticsOverlayPlugin], this includes having them being added as a child of [DiagnosticsOverlayPlane]. The plane will be initially spawned on the [GlobalZIndex] defined by [INITIAL_DIAGNOSTICS_OVERLAY_Z_INDEX]. You can order the Uis relative to it, or edit the [GlobalZIndex] of the plane.
The contents of the [DiagnosticsOverlay] entity are rebuilt every second. The system that rebuilds the contents of the overlays is defined on the [DiagnosticsOverlaySystems::Rebuild] system set.