UWorld::SpawnActor

Spawn Actors with given transform and SpawnParameters

Choose your operating system:

Windows

macOS

Linux

References

Module

Engine

Header

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

Include

#include "Engine/World.h"

Source

/Engine/Source/Runtime/Engine/Private/LevelActor.cpp

Syntax

AActor * SpawnActor
(
    UClass * InClass,
    FVector const * Location,
    FRotator const * Rotation,
    const FActorSpawnParameters & SpawnParameters
)

Remarks

Spawn Actors with given transform and SpawnParameters

Returns

Actor that just spawned

Parameters

Parameter

Description

Class

Class to Spawn

Location

Location To Spawn

Rotation

Rotation To Spawn

SpawnParameters

Spawn Parameters