Esempio n. 1
0
#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
        }
Esempio n. 2
0
 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();
 }