void OnDrawGizmosSelected() { if (myPath != null && myPath.list.Length > 0) { myPath.color = Color.green; var grid = gridScript.grids[gridI]; myPath.DisplayPath(curPoint, grid.points, grid.nodeDist); } }