Hi!
I am just beginning to use Behavior Designer.
My idea was to keep trees small and clean by changing External BTs for people in my game (pedestrian decorations).
Lets say, some are performing group discussions, while others are shopping, or just wandering around.
Every person was supposed to start without any tree, only plugged in shared variables, like MyGameObject and MyAnimator.
Then i intended to plug in external BTs with proper behaviors and interchange them as needed, to keep the trees nice and small.
When i tried to inject all of my people with a simple External BT of "Play Random Idle Animation" (Smoke a cigarette, check the phone etc.) it started to break, as only ONE person was performing anything, all other persons were referencing MyGameObject and MyAnimator to that ONE person.
Own trees, on each prefab have those 2 shared variables plugged, and external BT also have those 2. According to documentation, i hoped that each one of them would "copy" this BT into itself, and use its own variables to play animations.
I tried also version with GetComponent at start, same result, as only one person is playing animations.
I tried version with GetComponent in update (just out of hope ), same result, as only one person is playing animations.
Having variables in own Tree component hoping they will sync with External BT (i believe they synced the other way around... )
Grabbing components from own class attached to GameObject (i think it still cached component on wrong GameObject ).
Any help or advice how to share single instances of External BTs on multiple prefab instances on the scene and switching them dynamically? Or should i change my approach to the subject?
I am just beginning to use Behavior Designer.
My idea was to keep trees small and clean by changing External BTs for people in my game (pedestrian decorations).
Lets say, some are performing group discussions, while others are shopping, or just wandering around.
Every person was supposed to start without any tree, only plugged in shared variables, like MyGameObject and MyAnimator.
Then i intended to plug in external BTs with proper behaviors and interchange them as needed, to keep the trees nice and small.
When i tried to inject all of my people with a simple External BT of "Play Random Idle Animation" (Smoke a cigarette, check the phone etc.) it started to break, as only ONE person was performing anything, all other persons were referencing MyGameObject and MyAnimator to that ONE person.
Own trees, on each prefab have those 2 shared variables plugged, and external BT also have those 2. According to documentation, i hoped that each one of them would "copy" this BT into itself, and use its own variables to play animations.
I tried also version with GetComponent at start, same result, as only one person is playing animations.
I tried version with GetComponent in update (just out of hope ), same result, as only one person is playing animations.
Having variables in own Tree component hoping they will sync with External BT (i believe they synced the other way around... )
Grabbing components from own class attached to GameObject (i think it still cached component on wrong GameObject ).
Any help or advice how to share single instances of External BTs on multiple prefab instances on the scene and switching them dynamically? Or should i change my approach to the subject?