void OnDrawGizmos() { var position = transform.position; var halfHeight = height / 2; position.y += halfHeight; DebugDraw.Cylinder(position, Vector3.up, radius, halfHeight, Color.red); }
void OnRenderObject() { if (!debugEnabled && !debugEnabledLocal) { return; } // The color for area zero is hard to see. So using black. Color color = (Area == 0 ? new Color(0, 0, 0, 0.8f) : ColorUtil.IntToColor(Area, 0.8f)); Transform trans = transform; Vector3 scale = trans.localScale; DebugDraw.Cylinder(trans.position - Vector3.up * scale.y * 0.5f , scale.x, scale.y, false, color); }