public static void GenerateClassFile(IEnumerable <string> strs) { var list = ConvertNamesListToCode(strs); ScriptGenerators.WriteFile(TagFilePath, list); AssetDatabase.Refresh(); }
private static string ConvertNamesListToCode(IEnumerable <string> strs) { var sb = new StringBuilder( @"namespace ForestOfChaosLib.MenuManaging { [System.Serializable] public partial class MenuManager { "); foreach (var name in strs) { sb.AppendFormat("\t\tpublic {0} {0};\n", name); } sb.AppendLine(); var l = strs.ToList(); l.Insert(0, "None"); sb.Append(ScriptGenerators.CreateEnumString("MenuTypes", l)); sb.Append( @" } }"); return(sb.ToString()); }
private static void GenerateEnum() { ScriptGenerators.CreateEnum(PlayerInputManagerWindow.InputManagerEnumName, PlayerInputManager.Inputs.Select(str => str.Axis)); }
private void SaveDataFile() { ScriptGenerators.WriteFile(TagFilePath, EnumList); }
private void CreateEnum() { ScriptGenerators.CreateCountEnum(EnumName, EnumList.Select(s => s.ToTitleCase().ReplaceWhiteSpace())); }
private static void WriteDataFile() { ScriptGenerators.WriteFile(DefineManager.DefineManagerPath, DataList); }