File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 11using CleverCrow . Fluid . BTs . Trees ;
2+ using System ;
23using System . Collections . Generic ;
34using UnityEngine ;
45
@@ -10,12 +11,20 @@ protected void Awake()
1011 {
1112 for ( int i = 0 ; i < 3 ; i ++ )
1213 {
13- trees . Add ( new BehaviorTreeBuilder ( gameObject ) . Name ( $ "Tree{ i } ") . Sequence ( )
14- . WaitTime ( 1 )
15- . ReturnSuccess ( )
16- . End ( ) . Build ( ) ) ;
14+ trees . Add ( new NestedTree ( )
15+ {
16+ tree = new BehaviorTreeBuilder ( gameObject ) . Name ( $ "Tree{ i } ") . Sequence ( )
17+ . WaitTime ( 1 )
18+ . ReturnSuccess ( )
19+ . End ( ) . Build ( )
20+ } ) ;
1721 }
1822 }
19- public List < BehaviorTree > trees = new List < BehaviorTree > ( ) ;
23+ public List < NestedTree > trees = new List < NestedTree > ( ) ;
24+ }
25+ [ Serializable ]
26+ public class NestedTree
27+ {
28+ public BehaviorTree tree ;
2029 }
2130}
You can’t perform that action at this time.
0 commit comments