Fix camera settings ignored
This commit is contained in:
parent
ae900053dc
commit
3bd383a46d
|
@ -27,14 +27,17 @@ FActorSpawnResult ASensorFactory::SpawnActor(
|
||||||
const FActorDescription &Description)
|
const FActorDescription &Description)
|
||||||
{
|
{
|
||||||
FActorSpawnParameters Params;
|
FActorSpawnParameters Params;
|
||||||
static int32 COUNTER = 0u;
|
|
||||||
Params.Name = FName(*(Description.Id + FString::FromInt(++COUNTER)));
|
|
||||||
auto *World = GetWorld();
|
auto *World = GetWorld();
|
||||||
if (World == nullptr)
|
if (World == nullptr)
|
||||||
{
|
{
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
auto *Sensor = World->SpawnActor<ASceneCaptureCamera>(Description.Class, Transform, Params);
|
auto *Sensor = World->SpawnActorDeferred<ASceneCaptureCamera>(
|
||||||
|
Description.Class,
|
||||||
|
Transform,
|
||||||
|
this,
|
||||||
|
nullptr,
|
||||||
|
ESpawnActorCollisionHandlingMethod::AlwaysSpawn);
|
||||||
if (Sensor != nullptr)
|
if (Sensor != nullptr)
|
||||||
{
|
{
|
||||||
using ABFL = UActorBlueprintFunctionLibrary;
|
using ABFL = UActorBlueprintFunctionLibrary;
|
||||||
|
@ -47,5 +50,6 @@ FActorSpawnResult ASensorFactory::SpawnActor(
|
||||||
PostProcessEffect::FromString(
|
PostProcessEffect::FromString(
|
||||||
ABFL::RetrieveActorAttributeToString("post_processing", Description.Variations, "SceneFinal")));
|
ABFL::RetrieveActorAttributeToString("post_processing", Description.Variations, "SceneFinal")));
|
||||||
}
|
}
|
||||||
|
UGameplayStatics::FinishSpawningActor(Sensor, Transform);
|
||||||
return FActorSpawnResult{Sensor};
|
return FActorSpawnResult{Sensor};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue