How to create custom K2Node with dropdown list?

I see there is cool K2Node: GetDataTableRow. It has small, but tasty feature: it has drop-down list at Name pin.

I want to create my own similar node. But I don’t see direct way to do it. No any references to drop-down list in UK2Node_GetDataTableRow. Not clear for me.

I belive Epics will give me any advices how to do that.

224371-dropdown.jpg

1 Like

Hey there, for what type of values would you like to have a dropdown?

I soloved the problem using CreateVisualWidget which creates custom pin via Slate.

I interested mainly for Name\String values. But this UK2Node_GetDataTableRow as I see built without this override…

Hi broly, I’m basically trying to do what you were attempting and also can’t make my K2Node work the way UK2Node_GetDataTableRow works.

You seem to have found a workaround but I don’t quite understand how you used CreateVisualWidget. I would really appreciate if you could point me in the right direction.

Here was the problem I wanted to solve.

My question is, if you could tell me more about the CreateVisualWidget of how you solved this, it would be very helpful.

I am working on the same problem (K2Node_GetDataTableRow).
I am trying to analyze the code of K2Node_GetDataTableRow to see if the same mechanism as the input of K2Node_GetDataTableRow can be supported for nodes that I create on my own.

I find the solution is that 第9期 UE4/5 K2Node蓝图节点设计与实现 - 知乎 (zhihu.com).
But there is still some problem I can not to solve.

I want to make a K2Node that can read the AttributeList of component,and creat a Namelist for all of Attribute.
There are my work and some code.

屏幕截图 2023-12-01 164409


屏幕截图 2023-12-01 164457

屏幕截图 2023-12-01 165232

But there still some problem perplex me.

I Get Linked component‘s pointer but can not read its property,it like the 42th line,I have add Property—“TestString” to NameList, but it return as “NONE”(The 3th for NameList )
But as the 40th line code,I try to get the linked compoent name,it is work.
How to read property of linked Uobject?

The second problem is that,I add a DataTable pin for CompareTest,the component and DataTable are UObject to.
I find that when the DataTable is chosed,the “TestDataPin->DefaultObject” is valid(Like Code 61th -63th line and it work as that the NameList can show the chosed DataTable’s Name)
But when the DataTablePin linke, it can not get pointer ,it is same as the K2Node_GetDataTableRow which is official node how fix it?