After a change to how StateTree handles Sub-trees returning succeeded, StateTree can now get caught in a loop when trying to transition out of the StateTree. Sub-tree completion and status should trigger the linked state's transitions, but it is getting stuck in transitioning out of the sub-tree.

Steps to Reproduce
  1. Create a StateTree using StateTree Component Schema
  2. Re-create the tree seen below
    1. [Image Removed]
  1. Create an actor with basic static mesh and add a StateTreeComponent to it
  2. Set the new actor to use the StateTree asset created.
  3. Add the actor to the level.
  4. Enter "log LogStateTree Verbose" into the console
  1. PIE
  2. Wait a few seconds

Expected Result: The tree exits after the delay is finished and no more debug text is displayed. Log indicates that tree has finished.

Actual Result: The tree gets stuck in a loop with the debug text still on screen and logs that repeat of the sub-tree completed and transitioning back into the sub-tree. Logs resemble this:

LogStateTree: Verbose: BP_STCube_C: Transition on state 'SubTreeState' -[(State Succeeded)]-> state '(State Succeeded)'
LogStateTree: Verbose: BP_STCube_C: Completed subtree 'TestDebugLinked' from state 'SubTreeState' (TestDebugLinked): Succeeded 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-187357 in the post.

Login to Vote

ComponentUE - AI - StateTree
Affects Versions5.2
Target Fix5.35.4
Fix Commit25926193
CreatedMay 30, 2023
ResolvedJun 19, 2023
UpdatedJun 19, 2023