Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Engine > UWorld
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Engine/World.h |
Include | #include "Engine/World.h" |
template<class T>
T &42; SpawnActorDeferred
&40;
UClass &42; Class,
FTransform const & Transform,
AActor &42; Owner,
APawn &42; Instigator,
ESpawnActorCollisionHandlingMethod CollisionHandlingOverride,
ESpawnActorScaleMethod TransformScaleMethod
&41;
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).