#pragma warning restore CS0649 /// <summary> /// Generate all enums configured on this generator. /// </summary> public void GenerateAll() { foreach (var options in enums) { if (options == null) { continue; } GeneratorApi.GenerateEnumToFile(options, logContext: this); } #if UNITY_EDITOR UnityEditor.AssetDatabase.Refresh(); #endif }
public void GenerateForFile(string inputFilePath) { foreach (var options in enums) { if (options == null) { continue; } if (options.AutoGenerate && options.InputFilePath == inputFilePath) { GeneratorApi.GenerateEnumToFile(options, logContext: this); } } UnityEditor.AssetDatabase.Refresh(); }