Hello I want to make an icon that changes color according to some ingame events, how can I do that? I do not want to use a button but I want to tint or recolor the icon I set up …
if your icon is an UMG image you can just TINT
you can also just CHANGE the image and make any change you like in Photoshop or any image editor…and option 3 is making it in a material and instead using a bitmap in the image slot, you just use a material instance.
what you mean by umg image? Its a png image I imported , I made it white so I can tint it in the engine .
how are you using that image in the game?
in a widget?..an UMG image is not a button…is an image object for widgets
I just dragged and dropped the image thing from the commonsubmeno on the left and replaced the blank white image with my imported icon png.
and I know I can tint it directly in the viewport but I want to tint it with a blueprint command on reaction to events.
just in case:
widgets have a blueprint section by clicking the icon in the top right of the screen:
This, I was looking but for some reasons I wasn’t finding it , thankyou!
Glad to help!
yes you can change it from the software you are using or you can directly contact to help desk for further assistance
Is it possible to do the exact same thing in code C++ ? Change the tint color of an UImage (with UMG UProperty) when press a button, if the button is selected the image is blue, when the button is not selected the image is black. Is it possible ? I can’t find a way to do that.
Ok I found a solution, I check in Unreal documentation of UImage if your method “eldany.uy” in blueprint “Set Brush Tint Color” exists and yes there is the same method in code.
So I just do it like this :
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
class UImage* StarImage;
StarImage->SetBrushTintColor(FLinearColor::Black);