public void EndDrawEdges() { if (guiWrapper.eventType != EventType.Repaint) { return; } DrawingUtility.EndLines(); Handles.color = m_TempColor; }
private void DrawRectGizmos() { if (Event.current.type == EventType.Repaint) { var selectedSprite = skinningCache.selectedSprite; var sprites = skinningCache.GetSprites(); var unselectedRectColor = new Color(1f, 1f, 1f, 0.5f); foreach (var sprite in sprites) { var skeleton = skinningCache.GetEffectiveSkeleton(sprite); Debug.Assert(skeleton != null); if (skeleton.isPosePreview) { continue; } var color = unselectedRectColor; if (sprite == selectedSprite) { color = DrawingUtility.kSpriteBorderColor; } if (skinningCache.mode == SkinningMode.Character && sprite != selectedSprite) { continue; } var matrix = sprite.GetLocalToWorldMatrixFromMode(); var rect = new Rect(matrix.MultiplyPoint3x4(Vector3.zero), sprite.textureRect.size); DrawingUtility.BeginLines(color); DrawingUtility.DrawBox(rect); DrawingUtility.EndLines(); } } }