using UnityEngine; using UnityEngine.UI; using System.Collections; public class UGuiEmptyImage : MaskableGraphic { protected override void OnPopulateMesh(VertexHelper vh) { vh.Clear(); } private void OnDrawGizmos() { Gizmos.color = Color.grey; Vector3[] worldCorners = new Vector3[4]; rectTransform.GetWorldCorners(worldCorners); for (int i = 0; i < worldCorners.Length; i++) { var target = i + 1; if (target >= worldCorners.Length) target = 0; Gizmos.DrawLine(worldCorners[i], worldCorners[target]); } } }