/// <summary> /// Draw Gizmos to show the current area bounds and edges. /// </summary> void OnDrawGizmos() { if (!GameManager.IsActive) { return; } var screenHeight = GameManager.Instance.WorldTopRightPosition.y - GameManager.Instance.WorldBottomLeftPosition.y; MyDebug.DrawGizmoRect(new Rect(AreaBounds.Min, GameManager.Instance.WorldBottomLeftPosition.y, AreaBounds.Max - AreaBounds.Min, screenHeight), Color.red); MyDebug.DrawGizmoRect(new Rect(_areaEdges.Min, GameManager.Instance.WorldBottomLeftPosition.y, _areaEdges.Max - _areaEdges.Min, screenHeight), Color.green); foreach (var displayItem in _activeDisplayItems) { MyDebug.DrawGizmoRect(new Rect(displayItem.GetLeftEdge(), GameManager.Instance.WorldBottomLeftPosition.y + .2f, displayItem.GetWidth(), screenHeight - .4f), Color.blue); MyDebug.DrawGizmoRect(new Rect(displayItem.GetLeftEdge() + displayItem.PaddingLeft, GameManager.Instance.WorldBottomLeftPosition.y + .3f, displayItem.GetWidth() - displayItem.PaddingLeft - displayItem.PaddingRight, screenHeight - .6f), Color.cyan); } }