Description

Undo fills AttachChildren array with null by the undo serializer.
After that, a construction script tries to remove child components from parent component's AttachChildren but it can't find its pointer.

To apply NonTransactional option in the UPROPERTY on the AttachChildren fixes this issue.

// USceneComponent
	/** List of child SceneComponents that are attached to us. */
	UPROPERTY(ReplicatedUsing = OnRep_AttachChildren, Transient, NoTransactional/*Added*/)
	TArray<USceneComponent*> AttachChildren;
Steps to Reproduce
  1. Open attached project with UE4.22.
  2. Select the right actor named CPP_Constructor in the level
  3. Set "Num of Meshes" 20 in detail pane.
  4. Undo
  5. See log and find NumAttachedChildren has Incorrect number of element

 

-------------------------------------------------------------------

LogTemp: NumChildren:20 NumStaticMeshes:20
Cmd: TRANSACTION UNDO
LogEditorTransaction: Undo Edit Num Of Meshes
LogTemp: NumChildren:20 NumStaticMeshes:10

-------------------------------------------------------------------

 

The following screenshot displays the broken array.

[Image Removed]

 

[Link Removed]

Have Comments or More Details?

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

0
Login to Vote

Backlogged
ComponentUE - Gameplay - Components
Affects Versions4.22
CreatedNov 14, 2019
UpdatedDec 5, 2023