/// <summary> /// 初期化 /// </summary> public IEnumerator Initialize(RuntimePlatform platform, AssetBundleConfig config) { m_saveDirRoot = config.GetSaveStorage(platform); m_versionFile = config.GetSaveFile(platform); var path = m_versionFile.FullPath; ChipstarLog.Log_InitStorageDB(path); var isExist = File.Exists(path); if (!isExist) { // なければ空データ BuildEmpty(m_versionFile); yield break; } try { // あったら読み込んで変換 var table = m_builder.Read(path); m_runtimeTable = table.List .ToDictionary( c => c.Identifier, c => new CachedFileData(c, m_saveDirRoot) ); } catch (Exception e) { // 読み込み失敗したのでとりあえず空でつくりなおし ChipstarLog.Assert(e.Message); BuildEmpty(m_versionFile); } yield return(null); }
//================================ // 関数 //================================ public override IAssetManager Build(RuntimePlatform platform, AssetBundleConfig config) { var prefex = AssetDatabase.GetAssetPath(m_rootFolder) + "/"; return(new AssetManagerEditorSimulator(prefex, config.GetSaveStorage(platform))); }