Hello
I seem to have discovered a bug in UE4.6.1 concerning the Draw Line function in UMG-widgets.
I have reproduced the bug with the following setup:
- Create new third-person blueprint project
- Create new empty GameMode and set it in the world settings
- Create new PlayerController and set it in the world settings
- Create new Widget blueprint and add an Image to the canvas panel (I chose a solid black image, 300x300px)
- Add a Draw Line node in the Event On Paint-event, drawing e.g. from 0/0 to 50/50 with white color
- Add the Widget to the Viewport in the PlayerController
You can now start the game. At first, everything will work alright, but after a couple seconds the rendering will start to break and “smear” all across the Viewport. On my machine it takes around 20 seconds until the broken rendering starts. This really seems like a bug to me, or am I missing something critical somewhere? To me it seems, like the drawing of the lines pollutes the rendering layers or something like that, where after a certain amount of time, the rendering engine cannot keep up anymore.
Finally, this is how things look:
Thanks about any feedback in advance!
Greetings,
Edit: What I’ve been trying to do, was replicating the Minimap from the StrategyGame-Example in 4.6 using UMG. I created a Slate-Widget with the same logic as in the StrategyGame-Example, and wrapped it in a UWidget using the RebuildWidget-function. The StrategyGame-Example uses the MakeLines function from Slate. This seems to cause the same problems as stated above (Draw Lines from UMG internally calls MakeLines from Slate), so I assume the bug is hiding somewhere in the MakeLines function, or how UMG renders the created lines. I have not yet come around to trying a Slate-only HUD with 4.6 to try the line drawing. Also, if this really is a bug, if there is any known work-around I would very much appreciate it, if someone could let me know