mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-26 21:37:01 +00:00
chore(testing): added detection of blueprints list
This commit is contained in:
parent
1891903f03
commit
65c009c210
@ -1,7 +1,5 @@
|
||||
use bevy::prelude::*;
|
||||
use bevy_gltf_blueprints::{
|
||||
BluePrintBundle, BlueprintName, GameWorldTag,
|
||||
};
|
||||
use bevy_gltf_blueprints::{BluePrintBundle, BlueprintName, GameWorldTag};
|
||||
use bevy_gltf_worlflow_examples_common_rapier::{GameState, InAppRunning};
|
||||
|
||||
use bevy_rapier3d::prelude::Velocity;
|
||||
|
@ -4,7 +4,7 @@ use std::{
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
use bevy_gltf_blueprints::{AnimationPlayerLink, BlueprintName};
|
||||
use bevy_gltf_blueprints::{AnimationPlayerLink, BlueprintName, BlueprintsList};
|
||||
pub use in_game::*;
|
||||
|
||||
use bevy::{
|
||||
@ -31,6 +31,8 @@ fn validate_export(
|
||||
animation_player_links: Query<(Entity, &AnimationPlayerLink)>,
|
||||
exported_cylinder: Query<(Entity, &Name, &UnitTest, &TupleTestF32)>,
|
||||
empties_candidates: Query<(Entity, &Name, &GlobalTransform)>,
|
||||
|
||||
blueprints_list: Query<(Entity, &BlueprintsList)>,
|
||||
) {
|
||||
let animations_found = !animation_player_links.is_empty();
|
||||
|
||||
@ -69,11 +71,13 @@ fn validate_export(
|
||||
}
|
||||
}
|
||||
|
||||
let blueprints_list_found = !blueprints_list.is_empty();
|
||||
|
||||
fs::write(
|
||||
"bevy_diagnostics.json",
|
||||
format!(
|
||||
"{{ \"animations\": {}, \"cylinder_found\": {} , \"nested_blueprint_found\": {}, \"empty_found\": {} }}",
|
||||
animations_found, cylinder_found, nested_blueprint_found, empty_found
|
||||
"{{ \"animations\": {}, \"cylinder_found\": {} , \"nested_blueprint_found\": {}, \"empty_found\": {}, \"blueprints_list_found\": {} }}",
|
||||
animations_found, cylinder_found, nested_blueprint_found, empty_found, blueprints_list_found
|
||||
),
|
||||
)
|
||||
.expect("Unable to write file");
|
||||
@ -99,7 +103,6 @@ impl Plugin for GamePlugin {
|
||||
.add_systems(Update, validate_export)
|
||||
.add_systems(OnEnter(AppState::MenuRunning), start_game)
|
||||
.add_systems(OnEnter(AppState::AppRunning), setup_game)
|
||||
|
||||
.add_systems(Update, generate_screenshot.run_if(on_timer(Duration::from_secs_f32(0.2)))) // TODO: run once
|
||||
.add_systems(
|
||||
Update,
|
||||
|
Loading…
Reference in New Issue
Block a user