State Tree Reselecting State Using Stale Event Data

Hi, we’ve noticed what seems to be a bug with State Tree parameters in UE5.7.

When a State Tree Event triggers a transition to an already-active state, the Input parameters of the state’s tasks appear to use data from the old Event Payload, not the latest one.

For example:

[Image Removed]

With State B:

[Image Removed]

STT_TestReenter:

[Image Removed]

And used like so:

[Image Removed]

In UE5.6, we get a printout of 1.0, 2.0. But as of 5.7 we get a printout of 1.0, 1.0.

It seems like when a state is selected by an `On Event` transition and then reselected by the same `On Event` transition, its tasks use stale data from the previous Event Payload, not the latest one.

What is the intended behavior here? If this is a bug, is there a fix in 5.8+, and is there a workaround we can use until then?

Thank you.

[Attachment Removed]

Steps to Reproduce
See desc for full info. In the test project, run the main level and observe the debug print of 1.0, 1.0, instead of the expected 1.0, 2.0.

[Attachment Removed]

Hi there,

Thank you for your repro project and details. I did some testing and this does seem like incorrect behavior. I looked into why this might be happening but I was not able to find anythign conclusive. I have created a bug report for this issue. Once it’s publicly tracked you will be able to view it here.

Thank you,

Louis

[Attachment Removed]

Oh good, thanks for the info. BTW I didn’t have the bandwidth to check whether this issue is fixed in Main (and there are many changes that seem relevant), so it might be worth looking there.

[Attachment Removed]

Thanks for the heads up.

I will mark this case as closed for now. However if you have any questions about it feel free to add them.

Louis

[Attachment Removed]