Description

If both assets have the same schema (StateTreeComponentSchema), but the root tree has the Context Actor class set to Character and the linked asset is using a Context Actor class of Pawn. So the schema is the same, but context data classes are what are different (with the linked asset using a parent class of the root tree's context data class.

The check in FStateTreeExecutionContext::SetLinkedStateTreeOverrides does seem to be backwards which would lead me to believe if the schema is the same for the StateTrees but each asset has changed the class used for the Actor in its context, it should run. In researching this, it seems to this is done in the wrong direction as it is the opposite of how compatibility is checked in SelectStateInternal_LinkedAsset.

The override is for two assets where the schema are the same class, and the only change between the assets is the Context Actor Class.

Error in logs when attempting to set override: Error: AIC_CustomDetour_C_0: FStateTreeExecutionContext::SelectStateInternal_LinkedAsset: The linked State Tree 'StateTree /Game/AI/StateTree/ST_ItemTree.ST_ItemTree' does not have compatible schema, trying to select state Root from 'Wait:Succeeded'. 'AIC_CustomDetour_C_0' using StateTree 'StateTree /Game/AI/StateTree/ST_RootTree.ST_RootTree'.

Steps to Reproduce
  1. Create a StateTree asset using StateTree Component Schema call Root Tree
  2. Set the Context Actor Class to use Character
  3. Add a state to wait a short time before attempting to use the linked asset
  4. Add a Linked Asset state to the tree with the tag set to allow override
  5. Add a transition for the wait state to go to the linked asset state
  6. Create another StateTree using StateTree Component Schema called Item Tree
  7. Set the Context Actor Class to use Pawn
  8. Add a state with a Debug Text task to print Item Tree at the context actor’s location
  9. Add a StateTreeComponent to a Character and set to use the Root Tree
  10. To the Character, on BeginPlay call SetLinkedStateTreeOverrides to supply the Item Tree with the gameplay tag used.
  11. Place Character into level
  12. PIE

Expected Result: The Character in the level displays Item Tree after a short delay when starting PIE

Actual Result: No text displayed and an error in the logs for incompatible context data.

Have Comments or More Details?

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

0
Login to Vote

Unresolved
ComponentUE - AI - StateTree
Affects Versions5.7
CreatedApr 3, 2026
UpdatedMay 13, 2026
View Jira Issue