Description

When an Actor is duplicated in the editor inside a world partition level it maintains references to the Actor it is a copy of. This can cascade, i.e. Actor C, which is a copy of Actor B which is a copy of Actor A, will have references to both Actor B and A.

This becomes an issue with script delegates, where currently registered script delegates will not have their object references replaced, and instead will contain a list of all of the past duplicated actor references.

E.g. For a concrete example, see ANiagaraActor. In ANiagaraActor::PostRegisterAllComponents, this registers a callback on its UNiagaraComponent's OnSystemFinished delegate. When you then copy this actor, the currently registered callbacks in OnSystemFinished will be copied and the copied Niagara actor then adds its own callback. Copy the actor again to add even more callbacks and object references.

This cannot be directly seen in the editor, but can be observed via a breakpoint or copying the actor into a text editor.

 

Steps to Reproduce
  • Create a new 5.3 project
  • Create a new world partition level
  • Add an instance of ANiagaraActor to the level
  • Copy and paste that Actor
  • Optionally, copy and paste the new duplicate as well
  • Breakpoint FWorldPartitionActorDesc::Init at some line after 195 to observe the ActorReferences array
  • Save either the first or second duplicate Actor
  • Observe the ActorReferences array containing the original Actor(s)

Have Comments or More Details?

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

4
Login to Vote

Unresolved
CreatedFeb 19, 2024
UpdatedFeb 20, 2024