I’m new to blueprints and can’t figure out on how to create a variable.
this is what my code looks like:
I’m creating a numpad, when I press a button I want to add concatenate the new number and the numbers that were already typed in. But I can’t seem to figure out how to make a string…
Thanks in advance
MakeLiteralString is a pure function. Pure functions are only executed when the output is needed. So any kind of function that doesn’t set variables but only gets variables are mostly pure functions.
Don’t drag the execution pin of your OnClicked(NR7) but instead simply rightclick the EventGraph and type MakeLiteralString.
The problem now is I can’t convert a string to a textbox. I’ve also tried typecasting it to a ‘text’ but it doesn’t work either.
How do I cast my string to a text box reference?
You’re trying to convert a string (what’s nothing but a few characters) to an UMG object. That doesn’t make much sense. The same applies for how you’re trying to get the content of your textbox. You’re converting it to a string. This will only give you the name of the textbox object but not its content. This is what you want: