Inconsistent behaviour when overriding variables in references to external BTs

elizabotVR

New member
We had noticed some weirdness with variables in a 3-level hierarchy of BTs, so I did some tests. I set up 3 simple behaviours:

Top level: just a behaviour tree reference that references the middle level.
Middle level: consists of a sequence. Logs the value of "Testing", then references the lowest level.
Lowest level: logs the value of "Testing".

I noticed that if I define a variable at the top level, I can override it in a behaviour tree reference node and the variable at the lowest level will have the override value.
But, if I do the same thing at the middle level the override has no effect: the variable will have the defined value NOT the override value.

This seems inconsistent and I'm guessing it's a bug.

I also noticed that in my last tests when I deleted the variable at the middle level and left an override at the middle level, the lowest level correctly got the override value. However, the middle level logged the value from the definition I deleted. I suspect this is also a bug. Additional note: the value persists even after closing and reopening Unity. (I'm not too concerned about this - just thought it was interesting.)

Anyway, I'm using behavior designer 1.6 in Unity 2017.2.0p4. Here's a diagram showing all the test cases I tried and the values that were logged:

bt_variables.png
 
If you update to version 1.6.1 this should be fixed. If it's not and can send me a repro scene that would be great.
 
Last edited:
Top