private void DoRangesGUI() { var radius = controller.radius; EditorGUILayout.Space(); EditorGUILayout.Space(); var rect = EditorGUILayout.GetControlRect(false, radius * 2f); if (Event.current.type == EventType.Repaint) { m_AngleRangeRect = rect; } { //Draw background var backgroundColor = Contents.proBackgroundColor; var backgroundRangeColor = Contents.proBackgroundRangeColor; if (!EditorGUIUtility.isProSkin) { backgroundColor = Contents.defaultBackgroundColor; backgroundRangeColor.a = 0.1f; } var c = Handles.color; Handles.color = backgroundRangeColor; SpriteShapeHandleUtility.DrawSolidArc(rect.center, Vector3.forward, Vector3.right, 360f, radius, AngleRangeGUI.kRangeWidth); Handles.color = backgroundColor; Handles.DrawSolidDisc(rect.center, Vector3.forward, radius - AngleRangeGUI.kRangeWidth + 1f); Handles.color = c; } if (targets.Length == 1) { { //Draw fill texture and sprite preview SpriteShapeHandleUtility.DrawTextureArc( m_FillTextureProp.objectReferenceValue as Texture, 100.0f, rect.center, Vector3.forward, Quaternion.AngleAxis(m_PreviewAngle, Vector3.forward) * Vector3.right, 180f, radius - AngleRangeGUI.kRangeWidth); var rectSize = Vector2.one * (radius - AngleRangeGUI.kRangeWidth) * 2f; rectSize.y *= 0.33f; var spriteRect = new Rect(rect.center - rectSize * 0.5f, rectSize); DrawSpritePreview(spriteRect); HandleSpritePreviewCycle(spriteRect); } controller.rect = m_AngleRangeRect; controller.OnGUI(); } EditorGUILayout.Space(); EditorGUILayout.Space(); }