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.
This commit is contained in:
parent
c0cebfef45
commit
490792ba7a
@ -18,7 +18,11 @@
|
|||||||
//! | `humanoids_inactive` | 4000 humanoid rigs. Only 10 are active. |
|
//! | `humanoids_inactive` | 4000 humanoid rigs. Only 10 are active. |
|
||||||
//! | `humanoids_mixed` | 2000 active and 2000 inactive humanoid rigs. |
|
//! | `humanoids_mixed` | 2000 active and 2000 inactive humanoid rigs. |
|
||||||
|
|
||||||
use bevy::prelude::*;
|
use bevy::{
|
||||||
|
diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin},
|
||||||
|
prelude::*,
|
||||||
|
window::ExitCondition,
|
||||||
|
};
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
|
|
||||||
/// pre-defined test configurations with name
|
/// pre-defined test configurations with name
|
||||||
@ -183,7 +187,15 @@ fn main() {
|
|||||||
|
|
||||||
App::new()
|
App::new()
|
||||||
.insert_resource(cfg)
|
.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)
|
.add_systems(Startup, setup)
|
||||||
// Updating transforms *must* be done before `PostUpdate`
|
// Updating transforms *must* be done before `PostUpdate`
|
||||||
// or the hierarchy will momentarily be in an invalid state.
|
// or the hierarchy will momentarily be in an invalid state.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user