Calling DrawMaterial in a CanvasRenderTarget2D Blueprint crashes in standalone game
I'm trying to make an in-game computer that displays a bash-like terminal, so for the screen part I'm using a CanvasRenderTarget2D, to which I draw text. This works fine, but I need to clear the render target, since it starts out green. I couldn't find a BP function that clears a Canvas to black, so before going all C++ on this I decided I'd try using DrawMaterial to do the same thing, which works fine in the editor, but crashes the standalone game. The crash reporter even gives a nice stack trace, from which the two top-most lines are as follows:
And checking line 631 of that header-file indeed points to getting the scene color for the current shading path, so obviously something colorful goes wrong when rendering this render target.
Is there a better way to clear a Canvas to a given color, or should this be a bug report, or both, or something else entirely? I could also show you what I've wired to what in my CanvasRenderTarget2D Blueprint:
Thanks for any help!
asked Jan 04 '16 at 07:43 PM in Bug Reports
Hello MVi -
This was an issue in 4.10, but has been corrected in 4.11. You can test the fix in your project by copying and trying it in Preview 1 of 4.11.
answered Jan 05 '16 at 03:53 PM
Lovecraft_K ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here