Developer Notes

Currently working as intended

Description

When dragging an actor from the content browser to the level viewport, PostActorCreated() is called twice, once as the actor enters the viewport while still being dragged and again when the LMB is released and the object is placed in location.

Steps to Reproduce
  1. Open UE4 Editor (any project)
  2. Add code to project based on actor (MyActor)
  3. In MyActor.h add the following:
    virtual void PostActorCreated() override;
    
  4. In MyActor.cpp add the following:
     void AMyActor::PostActorCreated() {
         Super::PostActorCreated();
         AActor* a = GetWorld()->SpawnActor<AActor>();
         a->SetActorLabel("___TEST");
     }
    
  5. Compile the code
  6. Create a blueprint based on MyActor and add it to the level

Result:
The world outliner will show two actors named "__TEST"

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Won't Fix
ComponentTools
Affects Versions4.10
CreatedNov 30, 2015
ResolvedApr 28, 2016
UpdatedJul 14, 2021
View Jira Issue