So, I have a HUD in which is textbox “Height”. Whenever player will type something there I want to make it a variable and pass it to Mycharacter Blueprint.
Thats my HUD blueprint
Now I want lets say write variable “Height” on the screen whenever i hit “Q”
MyCharacter bp:
I start game.
Write something in textbox.
Hit Q.
And i see default value of variable. Just like “Set height” is not working.
Could you try hooking an Event Tick up to your print sting so that the variable is printed out every frame? This will allow you to see if the variable is being changed. I used the setup shown in the pictures provided with this one exception (using a Tick event on the print string ) and it appeared to work just fine. If this is not the case please feel free to reopen this issue with additional information.
I noticed that the only time the print string is being called in the original setup is when the widget is created. This means that the only variable that will be printed out is the default variable. A new widget is created every time ‘Q’ is pressed and the variable that is being printed is the “height” variable of that respective widget.
Hey, not sure if it helps - but I was trying to learn how to pass variables between blueprints, and I was looking at all this stuff - but it didn’t quite click. Then, I watched this simple example video, and I finally understood the whole Cast To thing: