File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11use core:: any:: { self , TypeId } ;
22
3- use bevy:: { ecs:: relationship:: Relationship , platform:: collections:: HashMap , prelude:: * } ;
3+ use bevy:: {
4+ ecs:: { component:: Immutable , relationship:: Relationship } ,
5+ platform:: collections:: HashMap ,
6+ prelude:: * ,
7+ } ;
48use log:: { debug, trace} ;
59use petgraph:: {
610 Direction ,
@@ -39,11 +43,16 @@ pub trait ReplicateTogetherAppExt {
3943 /// children![(Replicated, Transform::default())],
4044 /// ));
4145 /// ```
42- fn replicate_together < C : Relationship > ( & mut self ) -> & mut Self ;
46+ fn replicate_together < C > ( & mut self ) -> & mut Self
47+ where
48+ C : Relationship + Component < Mutability = Immutable > ;
4349}
4450
4551impl ReplicateTogetherAppExt for App {
46- fn replicate_together < C : Relationship > ( & mut self ) -> & mut Self {
52+ fn replicate_together < C > ( & mut self ) -> & mut Self
53+ where
54+ C : Relationship + Component < Mutability = Immutable > ,
55+ {
4756 self . add_observer ( add_relation :: < C > )
4857 . add_observer ( remove_relation :: < C > )
4958 . add_observer ( start_replication :: < C > )
You can’t perform that action at this time.
0 commit comments