Overriden variables for subtrees do not seem to work if they are Property-Bound variables

Gigen

New member
Issue, step by step:
1. Create a property-bound Graph variable and bind it to a property on the curret game object
2. Add a Subtree Reference node somewhere into the current BT
3. In the Subtree define a variable that matches the property-bound variable's type
4. Back in the root BT, try to override the Subtree's variable from a dropdown, choosing the property-bound variable
Problem: This does not seem to save the state at all. Any loss of focus results in the overridden field to become null
 
Hi!
I am experiencing the same issue on the last version 2.0.5.
The sample given by opsive Subtrees or RuntimeBehaviour scene can be used to reproduce the issue.
Trying to override a subtree variable in the root BT will never be saved. Any loss of focus results in the overridden field to become null or even ctrl+s.
 
I am not able to reproduce this with the latest version. Can you list the specific steps that you are taking?
 
Hi!

Thank you for your quick answer!

1. I opened the scene Subtrees in the sample.
2. I clicked on the Atlas gameObject to open the associated Behaviour Tree.
3. I clicked on the first subtree reference.
4. I change one of the overriden variable with (none) with a value.
5. I did ctrl+s
6. Then if I change focus or just unselect the tree and go back the change is not saved.

I have first see the issue on a custom subtree I have made on a Subtree Reference Index with nested subtree inside.
I have also added, before all of this, new enum in Tools/Unit option/Types

I hope those information will help to reproduce the issue, right now I am unable to override the variable on a subtreeReference or a subtreeReferenceIndex

Have a nice day!
 
Thank you - that was easy to repro :)

I have it fixed. It related to a change in the last release. I'll send you a PM with the new version.
 
Hi!
Sorry to bother you again but there is another issues with overriden variables.
Step to reproduce:
1. Override a variable of a subtreeReferenceTask.
2. Save
3. Run Play and if we check the generated Tree he does not have the value overrwritten, he only have (none)
4. When we stop play and go back to the behaviour Tree all of our overriten variables have been canceled and are back to (none)
 
I am testing against the subtree sample scene and after I hit play the subtree values are correct, for example on the iterator:

1743507872956.png

Are you referring to something else?
 
In my case I am launching a subtree within a subtree Reference Selector

Unity_WqnMRwodJi.png

So when I start the game, as the index is 0, it will load the Strength subtree

Unity_ga5dGqhRxO.png

That subtree does have a nested subtree which does have the overritten variables:

Unity_GkaMDakP0p.png

Those variables are not touch inside the code but when I hit Play, here it is what I got:

Unity_dV6RtZhcTf.png

The overritten variable of the Strength subtree are not taken into consideration and when I get out of Play Mode, my overrtien variables are reset to strange values.

Unity_vQROouH8vH.png

This might not be a bug but can be due to something I do not understand with subtree and variable override
 
On your Increase Stat task do you have StartType listed within the override list? Are you able to send me a repro scene so I can take a closer look?
 
Yes, I do have it has seen in the second screenshot I sent and in this one but after the issue on Play it does diseappear like in the last screenshot of my las post. Unity_vWGL09dWrH.png

Unfortunately I can't send you my current test scene as we have a lot of different package and system.
 
And on the first subtree reference are you overriding the variable? Can you reproduce it within this scene? In this repro I have a multi-level nested trees that are overriding the variables at each level.
 

Attachments

In the Subtree reference selector i do not override those variables, only the subtree Strength is overriding the value of the IncreaseStat subtree.
 
This one was tricky. Thanks for sending. I have it fixed and am going to add some unit tests to ensure it stays fixed. I'll send you a new package shortly.
 
Back
Top