/// <summary> /// ロード設定を初期化(ゲーム起動直後にすること) /// </summary> static public void InitLoadTypeSetting(AssetFileManagerSettings.LoadType loadTypeSetting) { GetInstance().Settings.BootInit(loadTypeSetting); }
//ファイルのコンバート void Convert() { try { AssetFileManager assetFileManager = FindObjectOfType <AssetFileManager>(); if (assetFileManager == null) { Debug.LogError("FileManager is not found in current scene"); return; } //ファイルの入出力に使う FileIOManager fileIOManager = assetFileManager.FileIOManger; AssetFileManagerSettings settings = assetFileManager.Settings; if (outputType == OutputType.Default) { AssetFileManagerSettings.LoadType loadType = settings.LoadTypeSetting; if (isOutputLocal && LocalDirectory != null) { //ローカルの場合は、LoadTypeをLocalCompressedに settings.LoadTypeSetting = AssetFileManagerSettings.LoadType.LocalCompressed; string output = new MainAssetInfo(LocalDirectory).FullPath; //リソースをバージョンアップ AdvFileListConverter converter = new AdvFileListConverter(output, fileIOManager, settings); converter.VersionUp(VersionUpLocalFiles); if (isOutputLocalLog) { converter.WriteLog(false); } } if (isOutputServer && !string.IsNullOrEmpty(OutputServerResourcePath)) { //サーバーの場合は、LoadTypeをServerに settings.LoadTypeSetting = AssetFileManagerSettings.LoadType.Server; //シナリオやリソースをバージョンアップ AdvFileListConverter converter = new AdvFileListConverter(OutputServerResourcePath, fileIOManager, settings); converter.VersionUp(VersionUpServerFiles); if (isOutputServerLog) { converter.WriteLog(false); } //アセットバンドルをビルド BuildAssetBundles(OutputServerResourcePath, fileIOManager, settings, isOutputServerLog); } settings.LoadTypeSetting = loadType; } else { //シナリオやリソースをバージョンアップ AdvFileListConverter converter = new AdvFileListConverter(AdvancedOutputPath, fileIOManager, settings); converter.VersionUp(VersionUpAdvanceFiles); if (isOutputAdvancedLog) { converter.WriteLog(false); } //アセットバンドルをビルド BuildAssetBundles(AdvancedOutputPath, fileIOManager, settings, isOutputAdvancedLog); } AssetDatabase.Refresh(); } catch (System.Exception e) { Debug.LogException(e); } }