Shared Variable not updating?

DevM22

New member
Hello, Im new to this Behaviour tree asset so its very possible I'm doing something wrong.

I have this variable declared in the tree:
1625934685006.png

One of the tasks updates it:
1625934712092.png

Another task reads from that value:
1625934733513.png

The problem is that the enemyObjectiveType variable change from the first task is not reflected on the second task that checks it, am I doing something wrong here?

PS: I also have made sure that the reset variables on restart from the tree is turned off.
 
When you set the value you should use the .Value property. For example:

Code:
enemyObjectiveType.Value = 1;

You can verify that the value is set by outputting the value immediately after setting it.
 
Top