public static void CreateServerCFG() { GameObject obj = Selection.activeGameObject; SelectObjName = obj.name; ///Debug.LogError("selectionObj:"+obj.name); /// string path = EditorUtility.OpenFolderPanel("选择保存的文件夹", "Assets/", ""); ExportCFGInputWindow input = EditorWindow.GetWindow <ExportCFGInputWindow>(false, "导出配置表", true); input.Show(); }
void OnEnable() { instance = this; SceneView.duringSceneGui -= this.OnSceneGUI; SceneView.duringSceneGui += this.OnSceneGUI; GameObject selectOBJ = Selection.activeGameObject; Vector3 selectPos = selectOBJ.transform.position; dot1 = new Vector3(selectPos.x, 0, selectPos.z); dot2 = new Vector3(selectPos.x, 0, selectPos.z + 10); dot3 = new Vector3(selectPos.x + 10, 0, selectPos.z + 10); dot4 = new Vector3(selectPos.x + 10, 0, 0); mid1Cor = Color.green; mid2Cor = Color.green; mid3Cor = Color.green; mid4Cor = Color.green; }
void OnDisable() { instance = null; SceneView.duringSceneGui -= this.OnSceneGUI; }