UWorld::SpawnActorDeferred

Spawns given class and returns class T pointer, forcibly sets world transform (note this allows scale as well).

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/World.h

Include

#include "Engine/World.h"

Syntax

template<class T>
T * SpawnActorDeferred
(
    UClass * Class,
    FTransform const & Transform,
    AActor * Owner,
    APawn * Instigator,
    ESpawnActorCollisionHandlingMethod CollisionHandlingOverride
)

Remarks

Spawns given class and returns class T pointer, forcibly sets world transform (note this allows scale as well). WILL NOT run Construction Script of Blueprints to give caller an opportunity to set parameters beforehand. Caller is responsible for invoking construction manually by calling UGameplayStatics::FinishSpawningActor (see AActor::OnConstruction ).

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback