Description

User has encountered an issue with shared fragments that contain a member variable of type FInstancedStruct. It appears that UE::StructUtils::GetStructInstanceCrc32() does not correctly compute the CRC hash for such fragments—changes to the FInstancedStruct member do not affect the resulting hash value. As a result, when creating a shared fragment in a trait using EntityManager.GetOrCreateConstSharedFragment(), only a single entry may be generated, even if multiple Mass configs exist that differ solely in the FInstancedStruct member variable.

Steps to Reproduce

User has provided a repro project (see addl info URL). Using the third person example project:

User has also provided a code snippet to support the following repro steps:

  • Create a blueprint type ustruct & name it FInstancedStructBase with an FName uproperty.
  • Create two child structs FInstancedStructBool & FInstancedStructFloat. Add a uproperty of the respective type to each child struct.
  • Create another struct of type FMassConstSharedFragment named FTestConstSharedFragment . Add a uproperty of type FInstancedStruct with the BaseStruct metadata set to the appropritate type.
  • Create a child class of UMassEntityTraitBase. add a uproperty of FTestConstSharedFragment type named params.
  • Override the BuildTemplate function. inside the override, Get the entity manager & call GetOrCreateConstSharedFragment using params.
  • Then use UE::StructUtils::GetStructInstanceCrc32(FConstStructView::Make(Params)) and output the result of that function.
  • In the content browser create two MassEnityConfigAsset's
  • Add your Test Trait to each config. Modify the value in the instanced struct of each trait, ensuring they have unique values.
  • Modify your player controller, adding an array of MassEnityConfigAsset's natively.
  • Add the two mass configs as the default value.
  • on begin play, call GetOrCreateEntityTemplate(*GetWorld()) on each asset.
  • Observe in the output log that the hash values for each trait's parameters are the same.

Have Comments or More Details?

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

1
Login to Vote

Fixed
ComponentUE - AI - Mass
Affects Versions5.7
Target Fix5.8
Fix Commit53766608
CreatedMar 30, 2026
ResolvedMay 12, 2026
UpdatedMay 20, 2026
View Jira Issue