Could there be any difference in codebase we use?
As my debugging has definitely shown that CheckForSerialization was called with external behavior tree as source and that call did all the copying stuff.
Maybe you need to add an assert call for such condition and try playing with variables until...
Thank's for the reply. I've researched our workflow and determined one major issue that prevents what we try to do.
I've created a separate post: https://opsive.com/forum/index.php?threads/bug-external-tree-gets-copied-to-prefab.3939/#post-19395
What I do.
- created an empty project with Unity 2019.4.8 and BHD Source Runtime for 2019.3
- created an External Tree with variables
- created a prefab with an empty Behavior Tree
- opened prefab for editing
- assigned the External Tree
- set a variable
Right after I set any variable I get...
OK. It seems like setting the value from picker doesn't work in prefab editing mode. See the blue icon - this means that this is not the inner object, but an object from Scene. Main Camera is also not present in prefab.
OK, I'm trying to reproduce the problem and having a very strange behavior.
What I've done:
- created an empty project from scratch
- created a simple External Tree with GameObject Shared Variable (and few scalars)
- created a game object, added Behavior Tree component and then created a prefab...
I have the following setup: External Behavior Tree is referenced in prefab. Then there is a variant of this prefab. And in some cases when I modify the tree via Designer - the full tree gets serialized in the prefab variant. I need some time to determine the exact order of actions which leads to...
We are currently reusing behaviors via External Behavior Tree assets and making several prefab variants (Unity 2019.4) of enemies, with some SharedVariables tuning.
And currently we are facing the following problems:
- External behavior tree gets embedded into Behavior Tree component - which...