Summary
The hashing logic used by FMassEntityManager::GetOrCreateConstSharedFragment doesn’t take into account SoftObjectPtr properties when stored objects are not loaded.
What Type of Bug are you experiencing?
Framework
Steps to Reproduce
- Create a shared fragment.
- Create a trait with said fragment.
- Add the fragment to the build context using mentioned method.
- Create 2 entity DAs that reference different object in SoftObjectPtr.
- Start PIE with debugger attached, and breakpoint set in BuildTemplate method.
Expected Result
The shared fragments that differ only in SoftObjectPtr properties are correctly marked as different instances.
Observed Result
The mass uses already existing shared fragment, instead of creating a new version with correct SoftObjectPtr.
Affects Versions
5.5
Platform(s)
Windows
Additional Notes
I’d like to suggest reverting the change that made GetOrCreateConstSharedFragmentByHash private in 5.8