//获取新的脚本内容 private static string GetNewScriptContext(string className) { var script = new ScriptBuildHelp(); script.WriteEmptyLine(); var data = AddNamespaceWindow.GetData(); string name = data == null ? "UIFrame" : data.name; script.WriteNamespace(name); script.IndentTimes++; script.WriteClass(className); return(script.ToString()); }
//获取新的脚本内容 private static string GetNewScriptContext(string className) { var script = new ScriptBuildHelp(); script.WriteUsing("UnityEngine"); script.WriteEmptyLine(); var data = AddNamespaceWindow.GetData(); string name = data == null ? "UIFrame" : data.name; script.WriteNamespace(name); script.IndentTimes++; script.WriteClass(className, "MonoBehaviour"); script.IndentTimes++; List <string> keys = new List <string>(); keys.Add("void"); script.WriteFun(keys, "Start"); return(script.ToString()); }