Skip to content

Commit

Permalink
[Bug] Fixed TakeFromPool BP-node always return null, when 'ObjectClas…
Browse files Browse the repository at this point in the history
…s' argument is set as default value in BP node without connecting local variable
  • Loading branch information
JanSeliv committed Apr 29, 2024
1 parent b64a1d5 commit 584a35a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Binary file modified Binaries/Win64/UnrealEditor-PoolManagerEditor.dll
Binary file not shown.
Binary file modified Binaries/Win64/UnrealEditor-PoolManagerEditor.pdb
Binary file not shown.
5 changes: 3 additions & 2 deletions Source/PoolManagerEditor/Private/K2Node_TakeFromPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ void UK2Node_TakeFromPool::ExpandNode(class FKismetCompilerContext& CompilerCont
}
else
{
// Copy literal value
// Ensure the default value is copied even if not linked
CallClassPin->DefaultValue = ClassPin->DefaultValue;
CallClassPin->DefaultObject = ClassPin->DefaultObject;
}
}
else
Expand Down Expand Up @@ -213,7 +214,7 @@ void UK2Node_TakeFromPool::ExpandNode(class FKismetCompilerContext& CompilerCont

// connect loaded object from event to assign
{
UEdGraphPin* LoadedAssetEventPin = CompletedEventNode->FindPin(TEXT("Object"));
UEdGraphPin* LoadedAssetEventPin = CompletedEventNode->FindPin(ObjectOutputName);
ensure(LoadedAssetEventPin);
UEdGraphPin* AssignRHSPPin = AssignNode->GetValuePin();
bIsErrorFree &= AssignRHSPPin && LoadedAssetEventPin && Schema->TryCreateConnection(LoadedAssetEventPin, AssignRHSPPin);
Expand Down

0 comments on commit 584a35a

Please sign in to comment.