private void OnGUI() { if (GUILayout.Button("重新生成地图")) { CreateMapByOutSide(nWidth, nHeight, nClearAmount); } if (GUILayout.Button("寻路")) { List <NodeItem> lt = m_aFindPath.FindingPath(grid, getItem(StartPos.transform.position), getItem(DestPos.transform.position)); CreatePath(lt); } }