barsdeveloper / ueblueprint

Unreal Engine's Blueprint visualization web library
https://barsdeveloper.github.io/ueblueprint/
MIT License
46 stars 13 forks source link

node title having incorrect text for nodes relating to `Bind Event to ... ` #28

Closed Nathan903 closed 1 month ago

Nathan903 commented 1 month ago

hi, i noticed a minor issue with the displayed text of nodes about binding events. The text of the node is not correct (Bind Event to On Actor Hit becoming Add Delegate ). It seems to affect all nodes related to Bind Event to xyz. Can you please point me to the file/code this would relate to? Thanks a lot

Screenshot in UE5.4 (which says Bind Event to On Actor Hit) image

Screenshot in ueblueprint.js (which says Add Delegate) image

For reference blueprintue's text is also slightly off (no spaces between On Actor Hit) image

Blueprint code:

Begin Object Class=/Script/BlueprintGraph.K2Node_Event Name="K2Node_Event_0" ExportPath="/Script/BlueprintGraph.K2Node_Event'/Game/Examples/MazeSolver/Blueprints/MazeSolverTrainer.MazeSolverTrainer:EventGraph.K2Node_Event_0'"
   EventReference=(MemberParent="/Script/CoreUObject.Class'/Script/Engine.Actor'",MemberName="ReceiveBeginPlay")
   bOverrideFunction=True
   NodePosX=-16
   NodePosY=-48
   bCommentBubblePinned=True
   NodeGuid=48F238BE2ADD4D8EA77924086FBEC7F9
   CustomProperties Pin (PinId=D8F139579C644FEAA5D9815E22567E96,PinName="OutputDelegate",Direction="EGPD_Output",PinType.PinCategory="delegate",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(MemberParent="/Script/CoreUObject.Class'/Script/Engine.Actor'",MemberName="ReceiveBeginPlay"),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
   CustomProperties Pin (PinId=F135CD17D40347269BBBD101437B6AF0,PinName="then",Direction="EGPD_Output",PinType.PinCategory="exec",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_AddDelegate_0 252C72EA45F1370E8B00FFB6D5C87B3A,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
Begin Object Class=/Script/BlueprintGraph.K2Node_AddDelegate Name="K2Node_AddDelegate_0" ExportPath="/Script/BlueprintGraph.K2Node_AddDelegate'/Game/Examples/MazeSolver/Blueprints/MazeSolverTrainer.MazeSolverTrainer:EventGraph.K2Node_AddDelegate_0'"
   DelegateReference=(MemberParent="/Script/CoreUObject.Class'/Script/Engine.Actor'",MemberName="OnActorHit")
   NodePosX=256
   NodePosY=-48
   NodeGuid=A94C879148610E75EBAC94807E94F5DD
   CustomProperties Pin (PinId=252C72EA45F1370E8B00FFB6D5C87B3A,PinName="execute",PinType.PinCategory="exec",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_Event_0 F135CD17D40347269BBBD101437B6AF0,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
   CustomProperties Pin (PinId=66AE85F346F350F62B127B97DFC49563,PinName="then",Direction="EGPD_Output",PinType.PinCategory="exec",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
   CustomProperties Pin (PinId=D7358C004BE0EF6651DE69A7346E77D4,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "BaseMCDelegateSelfPinName", "Target"),PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.Class'/Script/Engine.Actor'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_CallFunction_0 EDE2516A4F187C93CBF2D7AE88066240,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
   CustomProperties Pin (PinId=180DE95D4FD5AF2404F1CB80F0FBD29E,PinName="Delegate",PinFriendlyName=NSLOCTEXT("K2Node", "PinFriendlyDelegatetName", "Event"),PinType.PinCategory="Delegate",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(MemberParent="/Script/CoreUObject.Package'/Script/Engine'",MemberName="ActorHitSignature__DelegateSignature"),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=True,PinType.bIsConst=True,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
Begin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name="K2Node_CallFunction_0" ExportPath="/Script/BlueprintGraph.K2Node_CallFunction'/Game/Examples/MazeSolver/Blueprints/MazeSolverTrainer.MazeSolverTrainer:EventGraph.K2Node_CallFunction_0'"
   bIsPureFunc=True
   bIsConstFunc=True
   FunctionReference=(MemberName="K2_GetPawn",bSelfContext=True)
   NodePosX=-96
   NodePosY=32
   NodeGuid=F6D815344547A6BEE1FC11AC1FE86645
   CustomProperties Pin (PinId=D2EACF36464D69DFB2B06C8190B94ECB,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinToolTip="Target\nController Object Reference",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.Class'/Script/Engine.Controller'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
   CustomProperties Pin (PinId=EDE2516A4F187C93CBF2D7AE88066240,PinName="ReturnValue",PinToolTip="Return Value\nPawn Object Reference\n\nReturn the Pawn that is currently \'controlled\' by this PlayerController",Direction="EGPD_Output",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject="/Script/CoreUObject.Class'/Script/Engine.Pawn'",PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_AddDelegate_0 D7358C004BE0EF6651DE69A7346E77D4,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
End Object
barsdeveloper commented 1 month ago

Hi, thanks for the report, I will look into it soon. You can find the function that gives the title of a node here: https://github.com/barsdeveloper/ueblueprint/blob/master/js/decoding/nodeTitle.js#L78 In the same folder you can find also the functions that return some other features of the node and pins. Subtitle is handled in the bode template class, will try to put it there in the future. Keep in mind that what is there is highly heuristic because the blueprint code (Begin Object...) does not tell exactly what type of node is that. I suspect Unreal gets the class and then relies a lot on default values of those classes in order to extract the information to render a node.

barsdeveloper commented 1 month ago

It seems I did not handle the case of /Script/BlueprintGraph.K2Node_AddDelegate in the nodeTitle() function, but the path is already there in Configuration.paths.addDelegate which means I did add this as an exception somewhere else (in nodeIcon()). There is also the subtitle (Target is Untitled) issue that I need to check. If you want you can give it a try with a pull request, I will fix it soon anyway.

image

Nathan903 commented 3 weeks ago

thanks for such a quick fix, before i event had a chance to took a stab at the bug. The update works beautifully for me!

barsdeveloper commented 3 weeks ago

Glad to hear, please feel free to open an issue when you see something off. I'm not using UE anymore that much these days therefore I won't be able to catch many bugs.