Under review

Behavior 0.2.4 bug

EdXL 5 months ago in Behavior updated by Marti (Lead Developer) 5 months ago 2

Hi, I have just updated Behavior modular to 0.2.4 from 0.2.2, and all of my behavior trees task/values are reset to empty (See attached image)..., anyway I can get them back? Or should I downgrade to 0.2.2?


Unity version:
Game Creator version:

Hi, I think I have found the bug, to reproduce it, do the following:

  1. Create new behavior tree and add some conditions and actions
  2. Go to Module Manager -> Backup behavior
  3. Disable "Behavior Examples", it will also remove all behavior data in \GameCreatorData folder
  4. Open behavior tree that you just created, it will show all fields empty like above attached image, then Unity will save it and mess up the file data id that the behavior tree points to...
  5. Restore the backup, it still shows empty fields since it can't find or match the correct action/conditon ids


- When restoring backups, DON'T open any behavior trees first.



- Is it possible to stop Unity updating the behavior tree when it can't find the action/condition? So it won't mess up or create new action/condition ids.


Under review

Thanks for the clear reproduction steps. We're taking note and see if we can find a way around this. Unfortunately, the serialization of Actions inside the Behavior Trees is something that we don't have access to. This means that we have to rely on Unity "guessing" what data refers to (usually throwing a null-reference exception when the data does not resolve correctly.

I'm opening a ticket and see if I can find a workaround this.