/// <summary> /// 更新资源 /// </summary> /// <param name="files"></param> /// <returns></returns> private IEnumerator UpdateAssets(List <string> files) { Debug.Log("开始更新资源"); progress = 0f; foreach (var item in files) { string fileUrl = resUrl + "/" + PlatformUtil.GetPlatformName() + "/" + item; Downloader downloader = new Downloader(resDir, fileUrl); yield return(downloader.Download()); progress += 1f / files.Count; } File.WriteAllText(configPath, newConfigTxt); }
public override void OnSingletonInit() { if (PlatformUtil.IsEditor()) { defaultSaveDir = "D:/Unity3dProjects/MiniFramework/Assets"; } else if (PlatformUtil.IsPC()) { defaultSaveDir = Application.streamingAssetsPath; } else if (PlatformUtil.IsPhone()) { defaultSaveDir = Application.persistentDataPath; } }
public ResourceLoad(LoadType loadType) { this.loadType = loadType; switch (loadType) { case LoadType.FromEditor: break; case LoadType.FromStreamingAssets: resDir = Application.streamingAssetsPath; break; case LoadType.FromPersistentPath: resDir = Application.persistentDataPath; break; } resDir += "/" + PlatformUtil.GetPlatformName(); configPath = resDir + "/config.txt"; }
public ResourceUpdate() { resDir = Application.persistentDataPath + "/" + PlatformUtil.GetPlatformName(); configPath = resDir + "/config.txt"; }