Skip to content

bosqmode/UnityUIDrawable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnityUIDrawable

A simple and performant drawing system for UGUI-space that makes use of rendertextures and shaders.

gif gif

Requirements

Unity 2019.2+ (might work with older ones, just not tested with) OpenGLES3, DX11, Vulkan (OpenGLES2 does not work)

Getting Started

Open up the project and ExampleDrawingScene

or

Create a screenspace-canvas and insert an UIDrawablePrefab into it.

UIDrawable.cs

The whole drawing functionality resides in the UIDrawable.cs, but the UIDrawablePrefab provides a set of tools to make it easier to use.

Initialization Color

Sets the color of the rendertexture (the background being drawn on) on Awake and when erased.

Render Multiplier

Multiplier for the underlying rendertexture's resolution. 1 being the width/height of the current RectTransform.

Colors

A helper array of colors that can be used via SetColor.

  • Note that one can just use SetColor(Color32)

AlphaBrush

Using the supplied DrawingShader-Alpha as a brush enables the user to use images with alpha to use different shapes

png

Acknowledgments

About

A simple and performant drawing system for UGUI-space that makes use of rendertextures and shaders.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published