16 auto StaticMeshDefinition = ABFL::MakeGenericDefinition(
20 StaticMeshDefinition.Class = AEmptyActor::StaticClass();
22 return { StaticMeshDefinition };
26 const FTransform &SpawnAtTransform,
30 auto *World = GetWorld();
33 UE_LOG(LogCarla, Error, TEXT
34 (
"AUtilActorFactory: cannot spawn mesh into an empty world."));
38 FActorSpawnParameters SpawnParameters;
39 SpawnParameters.SpawnCollisionHandlingOverride =
40 ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
42 auto *StaticMeshActor = World->SpawnActor<
AEmptyActor>(
43 ActorDescription.
Class, SpawnAtTransform, SpawnParameters);
TArray< FActorDefinition > GetDefinitions() final
Retrieve the definitions of the static mesh actor.
TSubclassOf< AActor > Class
Class of the actor to be spawned.
A description of a Carla Actor with all its variation.
FActorSpawnResult SpawnActor(const FTransform &SpawnAtTransform, const FActorDescription &ActorDescription) final
Spawn an actor based on ActorDescription and Transform.
Result of an actor spawn function.