static void CreatePanelScripts()
    {
        string headName = "";

        if (PopHeadLineWindow.isInfoSet)
        {
            if (File.Exists(Application.dataPath + "/RushDevelopFW/Scripts/SystemDefine/GlobalDefine/HeadInfo.json"))
            {
                headName = File.ReadAllText(Application.dataPath + "/RushDevelopFW/Scripts/SystemDefine/GlobalDefine/HeadInfo.json");
            }
        }
        else
        {
            headName = "";
        }
        string scripts = "\nusing System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing UnityEngine.EventSystems;\nusing RDFW;\n\npublic partial class " +
                         Selection.activeGameObject.name + " : UIBase {\n    public void Awake()\n    {\n        PanelInit();\n    }\n    public override void PanelInit()\n    {\n        Search4Expeted();\n        base.PanelInit();\n    }\n    public override void OnActive()\n    {\n        base.OnActive();\n    }\n    public override void OnInActive()\n    {\n        base.OnInActive();\n    }\n}";

        if (!File.Exists(Application.dataPath + "/Scripts/PanelScripts/" + Selection.activeTransform.name))
        {
            //Debug.Log("新建");
            Directory.CreateDirectory(Application.dataPath + "/Scripts/PanelScripts/" + Selection.activeTransform.name);
        }
        //Debug.Log(headName);
        File.WriteAllText(Application.dataPath + "/Scripts/PanelScripts/" + Selection.activeTransform.name + "/" + Selection.activeTransform.name + ".cs", scripts);
        CreatePanelScriptsTools.CreatePanelInit(Selection.activeTransform.name);
        AssetDatabase.Refresh();
    }
Beispiel #2
0
 public void CreateTargetIns(string[] panelAssets)
 {
     CreatePanelScriptsTools.CreateTargetIns(panelAssets, "a_P_Index");
 }
 public void CreateTargetIns(string[] panelAssets)
 {
     CreatePanelScriptsTools.CreateTargetIns(panelAssets, "b_P_Shot");
 }
 public void CreateTargetIns(string[] panelAssets)
 {
     CreatePanelScriptsTools.CreateTargetIns(panelAssets, "c_P_Edite");
 }
Beispiel #5
0
 public void CreateTargetIns(string[] panelAssets)
 {
     CreatePanelScriptsTools.CreateTargetIns(panelAssets, "e_Setting");
 }