Weird serialization bug in prefab mode

vallcrist

New member
So, we're having an issue that we're not sure is a bug on the newer versions or if we're misunderstanding some core concept on the usage of BehaviorDesigner.

We plan on using the tool for the AI of our enemies, in order to do that, we were going with an approach of one BehaviorTree asset for each type of enemy, each with it's own set of SharedVariables for the game designer to confgure as it pleases (things as attack radius, firing spot for guns, etc).

The issue we're having is related to the Variables in the tree. Our current setup is the enemy has a BehaviorTree component that has a ExternalBehaviorTree asset connected to in the ExternalBehaviorTree field, all enemies of the same type will be sharing the same asset. In the external behavior tree we created all variables that are needed for the workings of that tree, and we planned on linking the required objects/values on the prefab. What seems to be the problem is that the prefab is always reverting back to the variable values that are defined in the asset, and completely ignoring all changes we do to it in the prefab, and that is quite frustrating.

Are we doing something wrong? Should the ExternalBehaviorTree asset not have any variables whatsoever in them? If that is the case, how would we go about hinting at what variables a tree expects to be setup in order for it to function properly?

We've recently updated to 1.7.2, and I believe we were in 1.6.8 before.
 

Justin

Administrator
Staff member
Good catch - thanks for the heads up. I'll send you a new runtime with this fixed.
 

AlexIsCoolYo

New member
Has this issue been fixed? I'm having similar issues where my BT variables are being reset, seems to be after I enter prefab mode make changes & then leave prefab mode they are all reset to what the variables were before entering prefab mode. Doesn't happen all the time.
 

Justin

Administrator
Staff member
The variables issue has been fixed. I am on vacation now but will be releasing a new version next week.
 
Top