You are totally right, i went back to review the text in my widget and I was surprised it wasnt a text as I thought. I was suspecting some crazy weird idiosyncratic behavior… but it was just me. I will not miss this kind of things next time Thank you very much.
I created a widget, setted a Public Variable for text, and added this widget to my pawn.
In my pawn i set a new widget and assing the widget class to match my witget.
I dropped my widget to the event graph to be able to affect the widget, and as I try to access the Public Variable of my widget, it’s not listed in the options.
What’s up with this hearachies? Am I callign an instance? what should i be calling to access that variable?
I know i can create an interface blueprint or a dispatcher or some other wierd thing… but as I have the widget within the blueprint already, it should be easy to conect to it’s variables… the pointing is pretty obvious…
Please let me know how can I understand this kinds of relations as they are driving me crazy and there is not that much clear documentation.
A 3D Widget Component is not a widget, it is an actor component.
To get access to your widget from the widget actor component you need a “Get User Widget Object” node, which will return you your created User Widget. From that point you need to cast it to your “Reloj_Widget” then you can get the variables found inside of it.
I understand MajinSephiroth thnx, but I’m not there yet!
1- As I cast to Reloj_Widget, it allows me to “Set clock timer” (the text variable i’m trying to modify… but it happens not to be a text itself but a text reference! so… any suggestion there?
2- Where can I found some good explanation about what is what in this kind of definitions about UE4 objects/components/references/elements/instances… it is being really messy for me to figure it out… i’m able to program lots of things, but sometimes it gets kinda spooky to get the logic behind it, sometimes i can work around testing things, but it would be awesome to really understand how this really works, any suggestion there?
thnx very much.!
There seems to be a confusion between your variable and its type.
Your clock timer is not text. Clock timer is a text widget. If you want to set the text of your text widget, you need to get your text widget reference and call the set text node on it.
I highly suggest going over the UMG UI Documentation and becoming more familiar with umg objects.