Description

When using HasNativeMake or HasNativeBreak, UK2Node_CallFunction is used instead of K2Node_BreakStruct, but UK2Node_CallFunction does not consider the property DisplayName.

Collecting the properties of the Struct like K2Node_BreakStruct and setting the PinFriendlyName based on that data will solve this problem.Below is an example

 

bool UK2Node_CallFunction::CreatePinsForFunctionCall(const UFunction* Function)
{
...
const bool bShowWorldContextPin = ((PinsToHide.Num() > 0) && BP && BP->ParentClass && BP->ParentClass->HasMetaDataHierarchical(FBlueprintMetadata::MD_ShowWorldContextPin));

// add(from UK2Node_BreakStruct)
	FOptionalPinManager OptionalPinManager;
	TArray<FOptionalPinFromProperty> ShowPinForProperties;
	if (Function->PropertyLink)
	{
		FStructProperty* StructProperty = CastField<FStructProperty>(Function->PropertyLink);
		if(StructProperty)
		{
			UStruct* StructType = StructProperty->Struct;
			if(StructType)
			{
				OptionalPinManager.RebuildPropertyList(ShowPinForProperties, StructType);
			}
		}
	}
////////////////////////
...
else if (Function->GetReturnProperty() == Param && Function->HasMetaData(FBlueprintMetadata::MD_ReturnDisplayName))
			{
				Pin->PinFriendlyName = Function->GetMetaDataText(FBlueprintMetadata::MD_ReturnDisplayName);
			}

			// add
			for (FOptionalPinFromProperty Proerty : ShowPinForProperties)
			{
				if( Pin->PinName == Proerty.PropertyName)
				{
					Pin->PinFriendlyName = FText::FromString(Proerty.PropertyFriendlyName);
					break;
				}
			}
/////////
...

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-147650 in the post.

1
Login to Vote

Won't Fix
ComponentUE - Gameplay - Blueprint Editor
Affects Versions4.275.0
CreatedMar 31, 2022
ResolvedAug 23, 2022
UpdatedAug 23, 2022
View Jira Issue