当前位置:网站首页>热更新流程
热更新流程
2022-06-29 04:07:00 【TO_ZRG】
https://blog.csdn.net/qq_31336891/article/details/80859016
第一个要明确的是 stream asset 下 有三个配置文件 一个版本号 、 一个 资源列表(包括MD5)、一个 资源标记文件,标记该文件是在asset下 还是 缓存中,这个标记文件是实时更新的
但是 stream里面的资源列表 、版本号、标记文件 是不更新的 缓存中有一份最新的(始终更新) ,stream里面的只有在第一次安装时 才会使用到,其它的时候,都会用缓存里面的
开始热更
拉取服务器的版本号,和本地版本号对比
先看资源标记文件里面 包不包含该文件,
不包含
说明是新的资源 ,下载到缓存中,更新资源标记文件,把版本号和资源列表 写入缓存中
包含
说明该文件已存在,查看标记,看该文件是存在于 asset 里面还是缓存中
读取对应的MD5
如果不一样,则下载到缓存中,更新资源标记文件,把版本号和资源列表 写入缓存中
资源配置文件的作用就在于 从哪里读取MD5 文件
------------------------上面是其中一种方法--------------------------
第二种方法是,在初次安装时,把stream里面的资源,移动到缓存中,这样以后所有的操作 都是在缓存中进行,,,也不需要资源标记文件
加载资源的时候 都从缓存中加载
------------------------扩展--------------------------------------
1.UWQ 加载assetbundle 是在线加载,没有加载到本地,加载完就能用,这个适用于 在游戏内,玩家触发,比如需要下载一个资源后,才可以用,注意 每次都要在线下载
-----------------------------------
2.AssetBundle.LoadFromFile 是 asssetbundle 已经下载到缓存中了,需要从本地磁盘文件上加载assetbundle
------------------------------------
热更一般是 启动时 先把bundle 下载到本地,再调用2 方法,加载资源
边栏推荐
- Data statistical analysis (SPSS) [7]
- If you choose the right school, you can enter Huawei as a junior college. I wish I had known
- Devops note-05: what are the roles of Ba, SM, Po, PM, PD, dev, OPS and QA in the IT industry
- Seura 2 test code summary
- 技术:如何设计zkVM电路
- Libuv library overview and comparison of libevent, libev and libuv (Reprint)
- SQL two columns become multi row filter display
- Cloud native weekly | grafana 9 was officially released; The Chinese version of cloud native vocabulary is now online
- 访问数据库时出现错误
- Data collection and management [4]
猜你喜欢
随机推荐
Baidu AI Cloud service grid product CSM release 𞓜 hot public beta
Data statistical analysis (SPSS) [3]
自己动手搭建一个简单的网站
What is the dry goods microservice architecture? What are the advantages and disadvantages?
C language -- branch structure
[fpga+sin] FPGA implementation of sinusoidal signal generator module based on DDS (direct digital synthesis)
Live broadcast preview | neurips special session I & Young Scientists special session
技术:如何设计zkVM电路
Zhai Jia: from technical engineer to open source entrepreneur of "net red"
Establishment of small and medium-sized enterprise network
Share 60 divine vs Code plug-ins
On June 27, 2022, I have the right to choose the journey of the summer vacation.
New listing of operation light 3.0 -- a sincere work of self subversion across the times
微秒级 TCP 时间戳
String不同创建方式的区别
Idea of importing point cloud map into gazebo
Tech Cloud Report: Mixed Office B side: How Safety and Efficiency can be combined?
Cloud native weekly | grafana 9 was officially released; The Chinese version of cloud native vocabulary is now online
Data collection and management [1]
Whose encryption key is written in the code? (that's you)









