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:
Rob Parrett 2024-07-20 09:38:24 -07:00 committed by GitHub
parent c0cebfef45
commit 490792ba7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.