Behaviour Tree disappearing variables values

SniperDev

New member
We are utilizing behavior trees and applying the same tree across multiple enemies or NPCs in different prefabs. However, we have encountered a recurring issue where the variable values set within the behavior trees are being reset or lost, though the exact cause remains unclear. This issue has occurred multiple times, and we suspect that modifying the behavior tree may be causing the variable values to disappear across all enemies or NPCs. Could there be any details we might be overlooking?
 
What type of values? If they are scene objects you will need to get them at runtime:

 
Hi the values we set in inspector. It can be any type such as bool, gameobject etc.
For example; in below RunAway gameobject list disapear and we need to set them again and again

1727170404909.png
 
Is that a prefab? You will need to fetch those values at runtime since project-level assets cannot reference scene assets.
 
Where are they located? If it's a prefab this does indicate that you will need to load the values at runtime.
 
I'm having a similar issue where on play, my values get reset.
Prior to Pressing Play
1733497293321.png

After pressing play
1733497335289.png
 
That's an odd one. Can you send a repro scene to support@opsive.com so I can take a look? Also make sure you are running the most recent version of the asset.
I'm not really sure how to isolate and reproduce it, and my version is the latest.
I will say that replacing the behavior solved the issue. My guess is that since this started as an external behavior, there may be some remnants in how they're handled.

I copy/pasted from an external behavior into a scene behavior. I could also be that these have been around for a few versions and the update wasn't taking. In any case, I just needed to comb through the offending actions and replace them with fresh copies.
 
Back
Top