I have a Blueprint Class (DetectionActor
). It has a Widget component attached to the root; the Widget component has the Widget Class set to DetectionMat
, which is a Widget Blueprint I have created.
DetectionMat has a single image widget attached to the root (named Patch9
). I want to change the color of Patch9.
Manually changing any of the following properties in the editor does what I want:
- DetectionMat/ColorAndOpacity
- DetectionMat/ForegroundColor
- DetectionMat/Patch9/Tint
- DetectionMat/Patch9/ColorAndOpacity
How can I change these properties at runtime, from DetectionActor’s BP?
Here’s what I’ve tried in my blueprint (all failed):
- Call
Set Tint Color and Opacity
, passing in Widget component reference. Does nothing. - Cast the Widget component to a
DetectionMat
(the editor says this will always fail). - Get Children of Widget, in an attempt to get a reference to Patch9 (this gives me Scene Components, which can’t be cast to UserWidget)