Add pin buttons on input AND output side with blueprints and exposed variables

Hello. I’m producing a plugin that I would like to have “Add pin” buttons for string variables. Is this possible to be added to blueprints? Maybe using some libraries? :slight_smile:

Something like when you use “make array” ?

I do not think it is possible. Yes i know epic did some “magic” like that with some nodes, but sop far i could not find how.

However you can use data assets (like lyra uses).

Or explain what your desired goal is, maybe there are different ways of making it.

:slight_smile: Hey. I have a complex system in another project and I want to improve it. (This photo above is just an example) I want to be able to have pins to add variables of type string/Text to add clickable questions and so, in the output I can have answer branches. Everything is very dynamic without needing to go inside the widget and create more variables, exposing them. Would it be possible in blueprints?


And yes, Kind of “Make array” but exposing the variable.

For creating widgets with question and possible answers just use text as question, and array of text as possible answers to pick. You can always use MakeArray node to have that “add pin” node.

But generally i have not found way to declare blueprint or C++ functions in unreal that are modable. Closest solution to this is how Epic did code Lyra and how they use Data Assets there.

You can also make base widget either with inheritance, or use “custom content widget” that lets you place widget in widget.

It is possible, you just need to get right in there and build the nodes in C++ using the kismet library. Check out something like “UK2Node_FunctionEntry::ExpandNode()” in “K2Node_FunctionEntry.cpp” for more info…

3 Likes

You can add pins by selecting the variable in the blueprint class and ticking the Expose on Spawn box.

Select Variable - tick Expose on Spawn

image

In another Blueprint, create an instance of that class. The input pin will show the chosen variable(s).