Navigation
API > API/Developer > API/Developer/CQTest > API/Developer/CQTest/FSpawnHelper
Description
Spawn an Actor in the world.
Method guarantees that the Actor returned is valid, will assert otherwise.
| Name | SpawnActorAtInWorld |
| Type | function |
| Header File | /Engine/Source/Developer/CQTest/Public/Components/SpawnHelper.h |
| Include Path | #include "Components/SpawnHelper.h" |
template<typename ActorType>
ActorType & SpawnActorAtInWorld
(
UWorld & World,
const FVector & Location,
const FRotator & Rotation,
const FActorSpawnParameters & SpawnParameters,
UClass * Class
)
reference to the spawned object
Parameters
| Name | Remarks |
|---|---|
| World | World to spawn the Actor. |
| Location | Location to spawn the Actor in the world. |
| Rotation | Rotation to spawn the Actor in the world. |
| SpawnParameters | Struct of optional parameters used to assist with spawning. |
| Class | Class of the object to be spawned. |