Translucent Texture always displays as fully opaque with Verse
Hi everyone, recently, I’ve been writing Verse code to create a canvas and display an image inside of an overlay. As of now, the code I’m using looks like this:
TranslucentTexture := texture_block{DefaultImage := TranslucentImage,
DefaultDesiredSize := vector2{X := 300.0, Y := 50.0}}
Widget := overlay:
Slots := array:
overlay_slot:
Widget := TranslucentTexture
Canvas := canvas:
Slots := array:
canvas_slot:
Widget := Widget
SizeToContent := true
PlayerUI.AddWidget(Canvas, player_ui_slot{InputMode := ui_input_mode.None})
Note: I’ve cut out some parts of the code such as the if statement for getting PlayerUI for sake of brevity.
The image TranslucentImage is an image with 50% opacity.
When I run this code in my session, the image displayed on the screen is at 100% opacity. It seems like the opacity value in the original texture is automatically being set to 100%.
Does anyone know why this could be happening and if there is any way to fix it?
Also, I have tried using a color_block to display a yellow color_block with 50% opacity (using DefaultOpacity := 0.5), but it ends up being completely opaque yellow instead of being a bit translucent. Furthermore, when I use the TranslucentImage texture (from the code above) in a Widget Blueprint and then I display the Widget Blueprint with the HUD message device, it is displayed with the correct opacity. With the Verse code, however, it is always displayed as opaque.