Ejemplo n.º 1
0
        /// <summary>
        /// 生成sqlite
        /// 默认导出到当前平台目录下
        /// </summary>
        /// <param name="ouptputPath">自定义路径</param>
        public static void ALLExcel2SQLite(string ouptputPath, RuntimePlatform platform)
        {
            //触发bd环境周期
            BDFrameEditorBehaviorHelper.OnBeginBuildSqlite();

            var xlslFiles = GetAllConfigFiles();

            SqliteLoder.LoadOnEditor(ouptputPath, platform);
            {
                foreach (var f in xlslFiles)
                {
                    try
                    {
                        Excel2SQLite(f);
                    }
                    catch (Exception e)
                    {
                        Debug.LogError("导表失败:" + f);
                    }
                }
            }
            SqliteLoder.Close();
            //
            EditorUtility.ClearProgressBar();
            //触发bd环境周期
            BDFrameEditorBehaviorHelper.OnEndBuildSqlite(ouptputPath);
            AssetHelper.AssetHelper.GenPackageBuildInfo(ouptputPath, platform);
            Debug.Log("导出Sqlite完成!");
        }