A simple and performant drawing system for UGUI-space that makes use of rendertextures and shaders.
Unity 2019.2+ (might work with older ones, just not tested with) OpenGLES3, DX11, Vulkan (OpenGLES2 does not work)
Open up the project and ExampleDrawingScene
or
Create a screenspace-canvas and insert an UIDrawablePrefab into it.
The whole drawing functionality resides in the UIDrawable.cs, but the UIDrawablePrefab provides a set of tools to make it easier to use.
Sets the color of the rendertexture (the background being drawn on) on Awake and when erased.
Multiplier for the underlying rendertexture's resolution. 1 being the width/height of the current RectTransform.
A helper array of colors that can be used via SetColor.
- Note that one can just use SetColor(Color32)