- Draw 2D anti-aliased, GPU-instance-supported, 0 allocation shapes ( circle,line,arrow ) with one line of code in Unity
- Draw Labels ( now supports vr single pass instancing )
- Draw 3D Shapes ( somehow stable )
Edit the manifest.json file located in the Packages folder of your unity project and
add the follwing line to the list of dependencies:
"com.nukadelic.unityquickdraw": "https://github.com/nukadelic/UnityQuickDraw.git"Draw can be noramally called within the update function :
...
void Update(){Draw.matrix=transform.localToWorldMatrix;Draw.line(Vector3.zero,Vector3.forward,Color.red);}By default the render will only appear in play mode when calling draw methods from the update loop In order to render both in edit mode ( scene view ) and play mode you can add [ExecuteAlways] or [ExecuteInEditMode] , and subscribe draw function OnEnable and OnDisable , see example below :
[ExecuteInEditMode]publicclassDemoQuickDraw:MonoBehaviour{voidOnEnable()=>QuickDrawStatic.Add(OnDraw);voidOnDisable()=>QuickDrawStatic.Remove(OnDraw);voidOnDraw(){Draw.matrix=transform.localToWorldMatrix;Draw.label(Vector3.zero,"Label",Color.white);}}Forked from Miguel Ferreira
