From 490792ba7a5e6a718c1d6e7e00a2a36833bf5db5 Mon Sep 17 00:00:00 2001 From: Rob Parrett Date: Sat, 20 Jul 2024 09:38:24 -0700 Subject: [PATCH] Fix tracing with `transform_hierarchy` example (#14374) # Objective Fixes #7433 Alternative to #14323 ## Solution Add `DefaultPlugins` so we actually have tracing spans when using `trace_tracy` or `trace_chrome`. ## Testing ``` cargo run --release --features trace_tracy --example transform_hierarchy large_tree ``` This now connects to Tracy and sends a bunch of data. --- examples/stress_tests/transform_hierarchy.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/examples/stress_tests/transform_hierarchy.rs b/examples/stress_tests/transform_hierarchy.rs index 3e6064971e..404dc4cf82 100644 --- a/examples/stress_tests/transform_hierarchy.rs +++ b/examples/stress_tests/transform_hierarchy.rs @@ -18,7 +18,11 @@ //! | `humanoids_inactive` | 4000 humanoid rigs. Only 10 are active. | //! | `humanoids_mixed` | 2000 active and 2000 inactive humanoid rigs. | -use bevy::prelude::*; +use bevy::{ + diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin}, + prelude::*, + window::ExitCondition, +}; use rand::Rng; /// pre-defined test configurations with name @@ -183,7 +187,15 @@ fn main() { App::new() .insert_resource(cfg) - .add_plugins((MinimalPlugins, TransformPlugin)) + .add_plugins(( + DefaultPlugins.set(WindowPlugin { + primary_window: None, + exit_condition: ExitCondition::DontExit, + ..default() + }), + FrameTimeDiagnosticsPlugin, + LogDiagnosticsPlugin::default(), + )) .add_systems(Startup, setup) // Updating transforms *must* be done before `PostUpdate` // or the hierarchy will momentarily be in an invalid state.