Exemple #1
0
 public void DrawSpriteRectBorder()
 {
     if (spriteEditor.selectedSpriteRect != null &&
         Event.current != null && Event.current.type == EventType.Repaint)
     {
         CommonDrawingUtility.BeginLines(Color.green);
         CommonDrawingUtility.DrawBox(spriteEditor.selectedSpriteRect.rect);
         CommonDrawingUtility.EndLines();
     }
 }
 private void DrawGizmos()
 {
     if (Event.current.type == EventType.Repaint)
     {
         var selected = spriteEditor.selectedSpriteRect;
         if (selected != null)
         {
             CommonDrawingUtility.BeginLines(CommonDrawingUtility.kSpriteBorderColor);
             CommonDrawingUtility.DrawBox(selected.rect);
             CommonDrawingUtility.EndLines();
         }
     }
 }