private void OnDrawGizmos() { if (!showDebugPath) { return; } Gizmos.color = Color.red; Vector2 pos = randomPatrolArea.position; pos += new Vector2(randomPatrolArea.size.x / 2, randomPatrolArea.size.y / 2); Gizmos.DrawWireCube(pos, randomPatrolArea.size); if (m_targetPos != null && m_path != null) { Gizmos.color = Color.cyan; Gizmos.DrawCube(m_targetPos, new Vector3(1, 1, 1)); m_path.DebugDraw(); } }