mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
Invert the dependency between bevy_animation and bevy_ui (#15634)
# Objective - Improve crate dependency graph ## Solution - Invert a dependency ## Testing - Tested ui and animation examples
This commit is contained in:
parent
61e11ea440
commit
0b9a461d5d
4 changed files with 10 additions and 7 deletions
|
@ -27,9 +27,6 @@ bevy_utils = { path = "../bevy_utils", version = "0.15.0-dev" }
|
|||
bevy_ecs = { path = "../bevy_ecs", version = "0.15.0-dev" }
|
||||
bevy_transform = { path = "../bevy_transform", version = "0.15.0-dev" }
|
||||
bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.15.0-dev" }
|
||||
bevy_ui = { path = "../bevy_ui", version = "0.15.0-dev", features = [
|
||||
"bevy_text",
|
||||
] }
|
||||
bevy_text = { path = "../bevy_text", version = "0.15.0-dev" }
|
||||
|
||||
# other
|
||||
|
|
|
@ -44,7 +44,6 @@ use bevy_reflect::{
|
|||
};
|
||||
use bevy_time::Time;
|
||||
use bevy_transform::{prelude::Transform, TransformSystem};
|
||||
use bevy_ui::UiSystem;
|
||||
use bevy_utils::{
|
||||
hashbrown::HashMap,
|
||||
tracing::{trace, warn},
|
||||
|
@ -1043,6 +1042,10 @@ pub fn animate_targets(
|
|||
});
|
||||
}
|
||||
|
||||
/// Animation system set
|
||||
#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)]
|
||||
pub struct Animation;
|
||||
|
||||
/// Adds animation support to an app
|
||||
#[derive(Default)]
|
||||
pub struct AnimationPlugin;
|
||||
|
@ -1078,8 +1081,8 @@ impl Plugin for AnimationPlugin {
|
|||
expire_completed_transitions,
|
||||
)
|
||||
.chain()
|
||||
.before(TransformSystem::TransformPropagate)
|
||||
.before(UiSystem::Prepare),
|
||||
.in_set(Animation)
|
||||
.before(TransformSystem::TransformPropagate),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ bevy_reflect = { path = "../bevy_reflect", version = "0.15.0-dev", features = [
|
|||
"bevy",
|
||||
] }
|
||||
bevy_render = { path = "../bevy_render", version = "0.15.0-dev" }
|
||||
bevy_animation = { path = "../bevy_animation", version = "0.15.0-dev" }
|
||||
bevy_sprite = { path = "../bevy_sprite", version = "0.15.0-dev" }
|
||||
bevy_text = { path = "../bevy_text", version = "0.15.0-dev", optional = true }
|
||||
bevy_picking = { path = "../bevy_picking", version = "0.15.0-dev", optional = true }
|
||||
|
|
|
@ -152,7 +152,9 @@ impl Plugin for UiPlugin {
|
|||
PostUpdate,
|
||||
(
|
||||
CameraUpdateSystem,
|
||||
UiSystem::Prepare.before(UiSystem::Stack),
|
||||
UiSystem::Prepare
|
||||
.before(UiSystem::Stack)
|
||||
.after(bevy_animation::Animation),
|
||||
UiSystem::Layout,
|
||||
UiSystem::PostLayout,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue