Esempio n. 1
0
        private static void GenerateConfig()
        {
            string configPath = Application.dataPath + @"/GameMain/Configs/DefaultConfig";

            DataTableProcessor dataTableProcessor = DataTableGenerator.CreateDataTableProcessor(configPath);

            if (!DataTableGenerator.CheckRawData(dataTableProcessor, configPath))
            {
                Debug.LogError(Utility.Text.Format("Check raw data failure. DataTableName='{0}'", configPath));
                return;
            }

            DataTableGenerator.GenerateDataFile(dataTableProcessor, configPath);

            AssetDatabase.Refresh();
        }
Esempio n. 2
0
        private static void GenerateDataTableCode()
        {
            foreach (string dataTableName in GetDataTableNames())
            {
                DataTableProcessor dataTableProcessor = DataTableGenerator.CreateDataTableProcessor(dataTableName);
                if (!DataTableGenerator.CheckRawData(dataTableProcessor, dataTableName))
                {
                    Debug.LogError(Utility.Text.Format("Check raw data failure. DataTableName='{0}'", dataTableName));
                    break;
                }

                DataTableGenerator.GenerateCodeFile(dataTableProcessor, dataTableName);
            }

            AssetDatabase.Refresh();
        }