I was testing some behavior tree content and wanted to temporarily disable a behavior tree entirely. So, I disconnected the root node from the selector node below it and expected that to disable the behavior as nothing was connected. However, this actually had 0 effect and the behavior tree continued to operate like the root node was connected. None of my other changes had any effect either after this point.

The issue is that in UBehaviorTreeGraph::UpdateAsset it only tries to actually update the behavior tree model if the root node is connected to a selector node. Because I disconnected the root node, it no longer got into the logic that tried to rebuild the graph and the model was out of sync with the editor. Disconnecting the root node should either do something or create an error saying you are in a broken state. There doesn't appear to be a good way to temporarily disable tree so I added a wait 300 node instead

Steps to Reproduce
  1. Load some test content that uses behavior trees, confirm it is working
  2. Open behavior tree asset used in content, disconnect top node. It looks like nothing should be happening because nothing is connected
  3. Play again, confirm that test content still works as if the nodes were connected, when user expects behavior to be disabled

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-97749 in the post.

Login to Vote

ComponentGameplay - AI
Affects Versions4.26
Target Fix5.0-m5
CreatedAug 27, 2020
UpdatedSep 22, 2020