wrymen
New member
There is a nasty bug with setting variables via Behavior Tree Reference node
I have a Behavior Tree asset, with "Attack Target" variable of type Entity (Monobehavior)
This tree has a node, Clear Targets, focus on two variables, List<SharedEntity> and SharedEntity
They point to the above declared "Attack Target" variable.
Now I have another Behavior Tree, which has a Behavior Tree Reference node reference to the above tree. There is "Nearby Target" variable of type Entity.
I linked it, so the first tree variable is replaced by this Nearby Enemy.
Now all works fine, except the List<SharedEntity> is not replaced correctly, but the SharedEntity variable is replaced:
You can see the "Targets" variable list has the original "Attack Target" variables linked, which should not even exist. The "Target" variable has the correct "Nearby Enemy" linked.
I have a Behavior Tree asset, with "Attack Target" variable of type Entity (Monobehavior)
This tree has a node, Clear Targets, focus on two variables, List<SharedEntity> and SharedEntity
They point to the above declared "Attack Target" variable.
Now I have another Behavior Tree, which has a Behavior Tree Reference node reference to the above tree. There is "Nearby Target" variable of type Entity.
I linked it, so the first tree variable is replaced by this Nearby Enemy.
Now all works fine, except the List<SharedEntity> is not replaced correctly, but the SharedEntity variable is replaced:
You can see the "Targets" variable list has the original "Attack Target" variables linked, which should not even exist. The "Target" variable has the correct "Nearby Enemy" linked.