提交 1c6fe57f 编写于 作者: T tanghai

默认不启用ASYNC

上级 c9e3815b
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using UnityEngine;
......@@ -20,31 +17,14 @@ namespace Model
{
if (Define.IsAsync)
{
//string url = GlobalConfigComponent.Instance.GlobalProto.GetUrl() + "StreamingAssets/StreamingAssets";
//try
//{
// using (WWWAsync wwwAsync = EntityFactory.Create<WWWAsync>())
// {
// await wwwAsync.DownloadAsync(url);
// ResourcesComponent.AssetBundleManifestObject = wwwAsync.www.assetBundle.LoadAsset<AssetBundleManifest>("AssetBundleManifest");
// wwwAsync.www.assetBundle.Unload(false);
// }
//}
//catch (Exception e)
//{
// Log.Error($"下载错误: {url} {e}");
// return;
//}
try
{
using (BundleDownloaderComponent bundleDownloaderComponent = Game.Scene.AddComponent<BundleDownloaderComponent>())
{
await bundleDownloaderComponent.StartAsync();
}
Log.Debug("11111111111111111111111111111111");
Game.Scene.GetComponent<ResourcesComponent>().LoadOneBundle("StreamingAssets");
ResourcesComponent.AssetBundleManifestObject = Game.Scene.GetComponent<ResourcesComponent>().GetAsset<AssetBundleManifest>("StreamingAssets", "AssetBundleManifest");
Log.Debug("111111111111111111111111111111112");
}
catch (Exception e)
{
......
......@@ -571,7 +571,7 @@ PlayerSettings:
webGLCompressionFormat: 1
scriptingDefineSymbols:
1: NET45
4: NET45;ASYNC
4: NET45
platformArchitecture:
iOS: 2
scriptingBackend:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册