diff --git a/Plugins/UnrealMCPython/Source/UnrealMCPython/Private/MCPythonHelper.cpp b/Plugins/UnrealMCPython/Source/UnrealMCPython/Private/MCPythonHelper.cpp index faccbd4..5fbc42f 100644 --- a/Plugins/UnrealMCPython/Source/UnrealMCPython/Private/MCPythonHelper.cpp +++ b/Plugins/UnrealMCPython/Source/UnrealMCPython/Private/MCPythonHelper.cpp @@ -783,6 +783,13 @@ FString UMCPythonHelper::ConnectBlueprintPins(UBlueprint* Blueprint, const FStri SourcePin->MakeLinkTo(TargetPin); + // Notify both nodes so wildcard pins (e.g. MacroInstance nodes like ForEachLoop, or + // wildcard array library calls) can resolve their type from the new connection. The + // real graph editor does this via the schema's TryCreateConnection; MakeLinkTo alone + // doesn't trigger it, so wildcard-typed pins were silently left unresolved. + SourceNode->NodeConnectionListChanged(); + TargetNode->NodeConnectionListChanged(); + FBlueprintEditorUtils::MarkBlueprintAsModified(Blueprint); return MakeJsonSuccess(FString::Printf(TEXT("Connected %s.%s -> %s.%s"), *SourceNodeName, *SourcePinName, *TargetNodeName, *TargetPinName));