# Possible bug in StateTree SetLinkedStateTreeOverrides 

**URL:** <https://forums.unrealengine.com/t/possible-bug-in-statetree-setlinkedstatetreeoverrides/2836835>\
**Category:** Programming & Scripting\
**Tags:** Epic-Pro-Support, unreal-engine, question\
**Created:** [August 31, 2026, 8:34pm UTC](https://forums.unrealengine.com/t/possible-bug-in-statetree-setlinkedstatetreeoverrides/2836835 "2026-08-31T20:34:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [August 31, 2026, 8:34pm UTC](https://forums.unrealengine.com/t/possible-bug-in-statetree-setlinkedstatetreeoverrides/2836835/1 "2026-08-31T20:34:05Z")

</div>

Hi,

In FStateTreeExecutionContext::SetLinkedStateTreeOverrides, there is this code:

```auto
     if (!RootStateTree.HasCompatibleContextData(*ItemStateTree))
      {
        STATETREE_LOG(Error, TEXT("%hs: '%s' using StateTree '%s' trying to set override '%s' but the tree context data is not compatible."),
          __FUNCTION__ , *GetNameSafe(&Owner), *GetFullNameSafe(GetStateTree()), *GetFullNameSafe(ItemStateTree));
        bValid = false;
        break;
      }

```

(StateTreeExecutionContext.cpp~1234 (yes that’s the actual line number lol)) in 5.8.2

This condition appears to be backward: we think it should be:

`if (!ItemStateTree->HasCompatibleContextData(RootStateTree))`Because we want to allow `ItemStateTree` to have parameters which are subclasses of RootStateTree’s parameters, and not vice versa.

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [August 31, 2026, 8:34pm UTC](https://forums.unrealengine.com/t/possible-bug-in-statetree-setlinkedstatetreeoverrides/2836835/2 "2026-08-31T20:34:07Z")

</div>

**Steps to Reproduce** [Attachment Removed]

---

<div class="post-metadata">

**Author:** ![James.Keeling](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@James.Keeling](https://forums.unrealengine.com/u/James.Keeling)\
**Post date:** [September 3, 2026, 5:53pm UTC](https://forums.unrealengine.com/t/possible-bug-in-statetree-setlinkedstatetreeoverrides/2836835/3 "2026-09-03T17:53:19Z")

</div>

This is something we are aware of, and I do believe your change for using **!ItemStateTree-\>HasCompatibleContextData** is correct to mirror what is done in **SelectStateInternal\_LinkedAsset**. We have an open issue for this that can be found here: [UE-372599](https://issues.unrealengine.com/issue/UE-372599)

We have looked at looser context data constraints, but our attempts have not satisfied all of our requirements. I will note that StateTree is not seeing much activity at this moment with the focus on UE6, and I do not foresee the looser context data requirments making it into a release for UE5.

-James

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [September 10, 2026, 7:39pm UTC](https://forums.unrealengine.com/t/possible-bug-in-statetree-setlinkedstatetreeoverrides/2836835/4 "2026-09-10T19:39:31Z")

</div>

Hey Jeff,

In case you’re interested, I came up with a potential solution to this and similar cases to make overriding State Trees a bit more dynamic. See my response to this thread:

[Adding support for State Tree Linked Asset Overrides when the Overriding State Tree matches the runtime Owner [Content removed]

Note that we’re using 5.6.1 at the moment, so it’s possible you’ll need to make some adjustments for 5.8. Hope this helps!

[Attachment Removed]
