I’m trying to create a function whose output is wildcard structs.
By referring this tutorial, I made a simple function which output a FStructProperty specified by Target and VarName .
However, this will not change the pin type on the node, which means that you will need to know what struct it is, and connect the result pin to a node that accepts a struct of that type, otherwise it will not compile, and will probably crash if you connect it to a struct of another type.
You would have to create a custom node in order to automatically determine the type of the result struct pin, which is a bit more complicated. If you want to do it, you should take a look into UK2Node_GetDataTableRow, which does something similar to what you want to do, although your node will only require a small part of that. But the important part would be to override PinDefaultValueChanged and change the type of the result pin to that of the struct property (if found). The nice thing about this is that it will also provide compile time errors if the property is not found.
As you mentioned, making a custom node is needed to realize the automatic pin change.
I has already tackling this, but your information is very helpful.
Thanks so much for your information.