Skip to content

Commit

Permalink
Fixed cook fail on referencing editor-only properties
Browse files Browse the repository at this point in the history
  • Loading branch information
JanSeliv committed Mar 31, 2024
1 parent d873436 commit 2097963
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Binary file modified Binaries/Win64/UnrealEditor-PoolManager.dll
Binary file not shown.
Binary file modified Binaries/Win64/UnrealEditor-PoolManager.pdb
Binary file not shown.
3 changes: 3 additions & 0 deletions Source/PoolManager/Private/Factories/PoolFactory_Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ UObject* UPoolFactory_Actor::SpawnNow_Implementation(const FSpawnRequest& Reques
SpawnParameters.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
SpawnParameters.bDeferConstruction = true; // Delay construction to add it to the pool first
SpawnParameters.bNoFail = true; // Do not fail if spawn fails
#if WITH_EDITORONLY_DATA
SpawnParameters.bCreateActorPackage = false; // Do not bake this runtime actor into World Partition level
#endif

AActor* NewActor = World->SpawnActor(ClassToSpawn, &Request.Transform, SpawnParameters);
checkf(NewActor, TEXT("ERROR: [%i] %s:\n'NewActor' was not spawned!"), __LINE__, *FString(__FUNCTION__));

Expand Down

0 comments on commit 2097963

Please sign in to comment.