In UE 4.7.6, it seems that the alpha values are not being retained in UMG. When I’m building a menu with a transparent blue border (set by altering the brush colour) in the Widget editor, the menu takes on a solid blue colour when I run it in the level editor viewport. This is what it looks like in the editor:
Below is what the result is in the player.
Similarly, when I do something similar with the image and set an opacity value less than one, or attempt to add a throbber, the viewport does not seem to display it. It looks fine within the UMG editor.
But in the player, things are opaque. The throbber does not animate, and close inspection of the throbber shows that there are tiny x’s inside.
I’m wondering what’s the cause of this issue, and any help would be much appreciated!
Hello ,
I was unable to reproduce this issue on our end. I have a few questions for you that will help narrow down what issue it is that you are experiencing.
Quick questions:
- Can you reproduce this issue in a clean project?
- If so, could you provide a detailed list of steps to reproduce this issue on our end?
- Could you provide screen shots of any blueprints that may be involved with this issue?
Hi Rudy
Thanks for answering. I’ve tried reproducing the steps for both Unreal 4.7.6 and 4.8, and here’s what I’ve done in a fresh project for both.
- Created a new HUD (UserHUD) and a new Widget (WidgetTest)
- Created a new game mode (CustomGameMode), and set the default HUD to UserHUD
- In the HUD Blueprint, created an “event receive draw HUD” node, linked that to a “Create WidgetTest_C Widget” node (and set Class to “WidgetTest”, then added this to the viewport.
- In the WidgetTest, dropped a variety of transparent images, borders and throbbers. In the screenshot, I’ve only added a throbber.
- Ran the game in the viewport.
What I’m noticing (and that I forget to mention earlier) is that the throbber appears to be animated once, and then stops. Similarly, transparent images usually are transparent for a few frames and then become opaque.
Hello ,
I was able to reproduce the effect that you are seeing on your end. However, this is working as intended. After seeing that you are creating and adding the widget to the viewport with the Event Receive Draw HUD I realized why it appears that your widgets are not showing as transparent. This is due to the fact that the Event Receive Draw HUD is called every frame. This means that you are creating a copy of the widget and adding it to viewport every frame. As they begin to stack up they become more opaque. Try adding the widget on begin play within the player controller instead. I hope that this information helps.
Make it a great day.
Worked like a charm; thanks!