How can I get the Draw Line function on a widget to work? It is asking me for a Paint Context Structure and I have no idea what that is or whether I have to create one by myself.
The Draw Text function asks for the same thing. After googling a bit it seems like there used to be an older node that didn’t ask for this context so I suppose there’s a reason for this change but I just can’t figure it out.
Looks like you’re doing this inside the level blueprint. For some reason you need to remove the context sensitive flag to find the Draw Debug Line and related nodes in that blueprint alone:
This is not the way to render lines in widget blueprints, this is a debug line.** To render a line in widget you need to override the onPaint function.** There you will be able to connect the context pin. If you do not use widgets and still want to draw on screen in 2D,** you can also use Draw Line or other drawing functions available in HUD** (not Widget) blueprint. These functions do not need context (contrary to widget drawing functions). I mostly use debug drawing when I want to draw in 3D to test and visualize the functionality of my blueprints.
Cheers