// ------------------------------------------------------------------------ // end: rect // circle // ------------------------------------------------------------------------ // draw a circle on the XZ plane centered at origin in object space public static void DrawCircle(Vector3 center, Quaternion rotation, float radius, int numSegments, Color color, bool depthTest = true) { Mesh mesh = PrimitiveMeshFactory.Circle(numSegments); if (mesh == null) { return; } Material material = GetMaterial(depthTest); MaterialPropertyBlock materialProperties = GetMaterialPropertyBlock(); materialProperties.SetColor("_Color", color); materialProperties.SetVector("_Dimensions", new Vector4(radius, radius, radius, 0.0f)); Graphics.DrawMesh(mesh, center, rotation, material, 0, null, 0, materialProperties, false, false, false); }