Summary
In UE 5.8, UChildActorComponent::ChildActor is marked DuplicateTransient. In 5.5 and 4.27 it was NonPIEDuplicateTransient. Because of this, a child actor is no longer duplicated into the PIE world when its parent actor is placed in the level. OnRegister recreates it from the template instead. As a result:
- Everything the parent’s construction script set on the child actor is lost in PIE.
- Variables in the parent that cache the child actor or one of its components point to an object that is not the component’s actual ChildActor. Construction scripts are not rerun for PIE, so the stale reference is never updated.
Content that worked in 5.5 (physics constraints and inventory slots set up in the construction script) silently breaks in 5.8 PIE. Actors spawned at runtime are not affected.
What Type of Bug are you experiencing?
Gameplay
Steps to Reproduce
Steps to Reproduce:
- Create BP_Child (Actor) with a StaticMeshComponent Mesh and an integer variable Value = 0.
- Create BP_Parent (Actor) with a ChildActorComponent ChildComp (Child Actor Class = BP_Child) and a variable CachedChild (BP_Child object reference).
- In the construction script of BP_Parent: Cast to BP_Child (ChildComp → GetChildActor) → set Value = 42 on it → store it in CachedChild.
- In BeginPlay of BP_Parent: print CachedChild == ChildComp → GetChildActor and print Value of ChildComp → GetChildActor.
- Place BP_Parent in a level and start PIE (or Simulate).
Expected Result
Same as in 5.5: the comparison prints true and Value prints 42.
Observed Result
In 5.8 the comparison prints false and Value prints 0. CachedChild resolves to another BP_Child instance in the PIE world that is not the component’s ChildActor. In our project a cached ChildActor_CAT_268 was found, while the component’s ChildActor was …_CAT_16. Physics constraints connected to the cached components in BeginPlay therefore act on the wrong bodies.
Affects Versions
5.8
5.7
Platform(s)
Windows
Additional Notes
- Changed property: Engine/Source/Runtime/Engine/Classes/Components/ChildActorComponent.h, UPROPERTY(…, TextExportTransient, DuplicateTransient, …) TObjectPtr ChildActor; (5.5: NonPIEDuplicateTransient).
- Similar historical issues: UE-23143, UE-25451, UE-27008.
- If this change is intentional, please document it in the release notes / upgrade notes. We’d also like to know the recommended pattern for configuring child actors from a parent construction script. Two further questions: is it expected that the stale reference resolves to a leftover object instead of null, and could a CVar restore the previous behavior?
- Workaround: configure child actors and resolve references in BeginPlay via GetChildActor().