Esempio n. 1
0
        private void OnCreateButtonClick()
        {
            string goName = createName.Trim();

            if (string.IsNullOrEmpty(goName))
            {
                EditorUtility.DisplayDialog("失败", "输入生成的cs文件名", "确认");
                return;
            }

            if (Editor_UITool.CheckRepeatName(itemList))
            {
                EditorUtility.DisplayDialog("失败", "组件命名重复", "确认");
                return;
            }

            for (int i = itemList.Count - 1; i >= 0; i--)
            {
                if (itemList[i].GenAttribute_TranformPath == false)
                {
                    itemList.RemoveAt(i);
                }
            }

            Editor_UITool.CreateViewCS(itemList, goName, targetName, isGenHotfixDir);
            Editor_UITool.CreateContrlCS(itemList, goName, isGenHotfixDir);
            Editor_UITool.CreateWindowCS(goName, targetName, isGenHotfixDir);
            AssetDatabase.Refresh();
        }
        private void OnCreateButtonClick()
        {
            string goName = createName.Trim();

            if (string.IsNullOrEmpty(goName))
            {
                EditorUtility.DisplayDialog("失败", "输入生成的cs文件名", "确认");
                return;
            }

            if (Editor_UITool.CheckRepeatName(itemList))
            {
                EditorUtility.DisplayDialog("失败", "组件命名重复", "确认");
                return;
            }

            Editor_UITool.CreateViewCS(itemList, goName, targetName);
            Editor_UITool.CreateContrlCS(itemList, goName);
            Editor_UITool.CreateWindowCS(goName, targetName);
            AssetDatabase.Refresh();
        }