Component attachment is broken and detaches when “Simulate Physics” is enabled

Summary

When a custom component class contains sub-objects (nested components) defined in C++, the attachment hierarchy is correctly displayed in the Editor. However, if “Simulate Physics” is enabled on the main component, the nested sub-components lose their attachment breaks during Play In Editor (PIE). This issue does not occur when “Simulate Physics” is disabled.

What Type of Bug are you experiencing?

Editor

Steps to Reproduce

1.Define a custom USceneComponent or UPrimitiveComponent derived class in C++.
2.In the constructor of this class, initialize a sub-component member (e.g., UStaticMeshComponent*) using CreateDefaultSubobject.
3.Establish the hierarchy within the constructor using SubComponent->SetupAttachment(this).
4.Create an Actor (or Blueprint) and add this custom component.
5.In the Actor instance details, ensure “Simulate Physics” is set to False.
6.Launch PIE and verify the Sub-component remains correctly attached to the Main Component.
7.Stop PIE and set “Simulate Physics” to True on the Main Component.
8.Launch PIE again and observe the Component Visualizer/Outliner.

Expected Result

The nested Sub-component should maintain its attachment and relative transform to its parent Main Component during PIE, behaving as a single physical body (welded) or maintaining its relative offset regardless of the physics simulation state.

Observed Result

The sub-component detaches from the parent on the Editor.

Affects Versions

5.7

Platform(s)

Windows