25 const FTransform &Transform,
28 auto *World = GetWorld();
31 UE_LOG(LogCarla, Error, TEXT(
"AAIControllerFactory: cannot spawn controller into an empty world."));
35 FActorSpawnParameters SpawnParameters;
36 SpawnParameters.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
37 auto *Controller = World->SpawnActor<
AActor>(Description.
Class, Transform, SpawnParameters);
39 if (Controller ==
nullptr)
41 UE_LOG(LogCarla, Error, TEXT(
"AAIControllerFactory: spawn controller failed."));