private void OnGUI() { EditorGUILayout.BeginVertical(); roadWidth = EditorGUILayout.FloatField("路宽度", roadWidth); roadHeight = EditorGUILayout.FloatField("路整体高度", roadHeight); lineCount = EditorGUILayout.IntField("点个数", lineCount); roadType = (RoadMeshType)EditorGUILayout.EnumPopup("mesh的创建方法", roadType); roadHeightType = (RoadMeshHeightType)EditorGUILayout.EnumPopup("mesh的高度获得方式", roadHeightType); if (GUILayout.Button("查找出场景Navigation烘焙的mesh", GUILayout.Height(80))) { AStarHelpEditor.FindNavigationMeshAndInstantiate(); } if (GUILayout.Button("创建中心路mesh", GUILayout.Height(80))) { CreateNodeMesh(); } if (GUILayout.Button("直接创建mesh", GUILayout.Height(80))) { AStarHelpEditor.FindNavigationMeshAndInstantiate(); CreateNodeMesh(); } EditorGUILayout.EndVertical(); }