备份CatanBuilding瘦身独立工程
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using Script.EditorScript;
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
using UnityEngine;
|
||||
[ExecuteInEditMode]
|
||||
public class ExtendedEditorWindow : EditorWindow
|
||||
{
|
||||
[MenuItem("Window/Tool UI")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
GetWindow<ExtendedEditorWindow>("Tool UI");
|
||||
}
|
||||
|
||||
void OnGUI()
|
||||
{
|
||||
GUILayout.Label("This is an extended editor window", EditorStyles.boldLabel);
|
||||
|
||||
if (GUILayout.Button("生成棋盘模板"))
|
||||
{
|
||||
GameObject back = GameObject.Find("Board");
|
||||
BackBroadEditor board = back.GetComponent<BackBroadEditor>();
|
||||
board.GenerateBoard();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("生成箱子"))
|
||||
{
|
||||
GameObject back = GameObject.Find("Box");
|
||||
BoxBroadEditor board = back.GetComponent<BoxBroadEditor>();
|
||||
board.GenerateBoard();
|
||||
}
|
||||
|
||||
//if (GUILayout.Button("生成模板数据"))
|
||||
//{
|
||||
// GameObject tempObj = GameObject.Find("RandomPropsTemp");
|
||||
// RandomPropsTemp temp = tempObj.GetComponent<RandomPropsTemp>();
|
||||
// temp.GenerateTempData();
|
||||
//}
|
||||
|
||||
if (GUILayout.Button("导出数据"))
|
||||
{
|
||||
GameObject tempObj = GameObject.Find("RandomPropsTemp");
|
||||
RandomPropsTemp temp = tempObj.GetComponent<RandomPropsTemp>();
|
||||
temp.GenerateTempData();
|
||||
Debug.LogError("模板生成结束");
|
||||
|
||||
GameObject init = GameObject.Find("Init");
|
||||
ClampEditorController board = init.GetComponent<ClampEditorController>();
|
||||
board.ExportData();
|
||||
|
||||
Debug.LogError("导出数据结束");
|
||||
}
|
||||
if (GUILayout.Button("检查数据"))
|
||||
{
|
||||
GameObject init = GameObject.Find("Init");
|
||||
ClampEditorController board = init.GetComponent<ClampEditorController>();
|
||||
board.CheckData();
|
||||
|
||||
Debug.LogError("检查数据结束");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user