I tried using the docs and google with no luck.
I have an Actor with a widget class text. I have a child of an actor and I need to set the text color in the widget class in the main blueprint of the child actor.
There may be some issues with naming conventions, it’s kind of fuzzy.
Could you confirm this is that kind of hierarchy we’re dealing with here:
- Actor
- Child Actor Component
- CAC Actor
- Widget Component- Widget
- Brush Color (or any other property of the widget)
If this is your hierarchy, who needs to access that color? The Actor? Or something outside of the scope of this actor?
@everynone Someone from Reddit solved my problem.
So If I understand you correctly you want from an actor, that has a widget component on it, change the color of the widgets text.
If so, what you do:
On an event in the actor that has the widget component, use a reference of the widget component, from that “get user widget object” and you get a widget. This is a generic widget. So if this widget needs some specific part changed color you have to now cast to your specific widget and then call “set color and opacity”. If you are fine with color the whole widget, then the cast is not needed.
Yup, sounds about right.