当前位置:网站首页>热更新流程
热更新流程
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 方法,加载资源
边栏推荐
- Build a simple website by yourself
- Data collection and management [10]
- Anaconda自带的Spyder编辑器启动报错问题
- 【FPGA+sin】基于DDS(直接数字合成)的正弦信号发生器模块FPGA实现
- Why are you a test / development programmer? Can you recall
- 要不是和阿里P7聊过,我也不知道自己是个棒槌
- 科技云报道:混合办公的B面:安全与效率如何兼得?
- moudo网络库剖析
- Remote connection of raspberry pie in VNC Viewer Mode
- Data collection and management [9]
猜你喜欢

Technology cloud report: side B of mixed office: how to have both security and efficiency?
![[Brillouin phenomenon] Study on simultaneous measurement system of Brillouin temperature and strain distribution in optical fiber](/img/92/57792ef733964230d36e0b9bb218b4.png)
[Brillouin phenomenon] Study on simultaneous measurement system of Brillouin temperature and strain distribution in optical fiber
![[filter design] customize the filter with MATLAB according to the design index](/img/b2/b5576c5eb6dbe9a0c64158802aa1d0.png)
[filter design] customize the filter with MATLAB according to the design index

【C语言】解决 “address of stack memory associated with local variable ‘num‘ returned”

If I hadn't talked to Ali P7, I wouldn't know I was a mallet

leetcode - 295. 数据流的中位数

Efficientnetv2 - get smaller models and faster training with NAS, scaling, and fused mbconv

中小型企业网络的组建

Vg4131sxxxn0s1 wireless module hardware specification

Kingbase export table structure
随机推荐
Ask the handler about the memory leak scenario in the interview. Don't just know static internal classes & weak references!
Zhai Jia: from technical engineer to open source entrepreneur of "net red"
Error accessing database
Here comes Wi Fi 7. How strong is it?
你为什么做测试/开发程序员?还能回想出来吗......
Whose encryption key is written in the code? (that's you)
要不是和阿里P7聊过,我也不知道自己是个棒槌
Data statistical analysis (SPSS) [5]
情绪的变化需要控制
How to merge upstream and downstream SQL data records
欧拉开源社区第二届理事会第二次会议召开,新华三、超聚变和龙芯中科成为理事会成员单位
MobileOne: 移动端仅需1ms的高性能骨干
Logstash starts too slowly or even gets stuck
What is the dry goods microservice architecture? What are the advantages and disadvantages?
Data collection and management [9]
logstash启动过慢甚至卡死
【C语言】开启一个线程
Data collection and management [10]
The second meeting of the Second Council of Euler open source community was held, and Xinhua III, hyperfusion and Godson Zhongke became members of the Council
数据库和缓存如何保持一致性