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; } } ///////// ...
I am not able to find world outliner how to enable it?
How to achieve HLSL Multiple Render Target in Material blueprints?
What method is used to fill polygonal regions when drawing spline mesh at run time?
How can i modify the param name in EQS node
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
An error occurred while trying to generate project files !?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-147650 in the post.
1 |
Component | UE - Gameplay - Blueprint Editor |
---|---|
Affects Versions | 4.27, 5.0 |
Created | Mar 31, 2022 |
---|---|
Resolved | Aug 23, 2022 |
Updated | Aug 23, 2022 |