Comments (4)
我的做法是分段加载
const int perNum = 50; //同时下载的个数
public async UniTask<RawFileHandle[]> LoadRawFileByTags(string[] tags)
{
var infos = package.GetAssetInfos(tags);
RawFileHandle[] handles = new RawFileHandle[infos.Length];
int finish = 0;
for (int i = 0; i < infos.Length; i++)
{
var handle = package.LoadRawFileAsync(infos[i]);
handles[i] = handle;
handle.Completed += (_) => finish++;
if ((i + 1) % perNum == 0)
{
await UniTask.WaitUntil(() => finish == perNum);
finish = 0;
}
}
await UniTask.WaitUntil(() => finish == infos.Length % perNum);
return handles;
}
from yooasset.
你用的yooasset是哪个版本?
from yooasset.
2.1.2
from yooasset.
方便加QQ好友吗?可以在QQ群里找到我。
from yooasset.
Related Issues (20)
- Unity版本2022.3.35、YooAsset版本号2.2.0-preview/2.2.1-perview,发布webgl平台时候,在unity运行下载包正常,浏览器会卡住逻辑 HOT 1
- 2.2版本 在unity2019编译报错
- 官方文档SimulateManifestFilePath找不到了 HOT 1
- UNITY_WECHAT_GAME 这个宏还在使用吗? HOT 2
- Share包不会带AssetTag HOT 5
- 文档Task加载方式会报错 HOT 2
- Exception: Not found active package manifest !
- url path include some special characters are invalid
- 文档翻烂了 没发现初始化到底有啥问题 加载资源就报错Can not found active package manifest ! HOT 1
- Error while downloading Asset Bundle: Failed to decompress data for the AssetBundle HOT 2
- [Question]2.2.1-preview版本的资源解密是怎么处理 HOT 2
- [Enhancement]2.2.x版本建议暴露一些获取版本信息的接口 HOT 1
- 希望开放 ExecuteBuild 方法,方便做一键编译dll+打包资源+打包exe的操作 HOT 1
- 如何实现项目介绍时说的。发布一个偏单机的游戏安装包,在网络畅通的时候,支持正常更新。在没有网络的时候,支持游玩老版本 HOT 1
- 微信小游戏平台使用Extension Sample中下载器,OnDownloadProgressCallback进度异常 HOT 7
- 版本2.1.2 SBPBuildTasks没有CreateBuiltInBundle方法。unity2021.3.27f1,SBP版本1.20.2。2.2.3-preview也是一样的 HOT 1
- [Bug]2.2.3-preview host play mode 卡流程 HOT 1
- [Feat]OfflinePlayMode在StreamingAssets直接替换文件 HOT 2
- WebGL不支持多Package和不支持原生打包管线的原因是什么 HOT 1
- 关于怎么分组加载
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yooasset.