当前位置:网站首页>Gameframework: package resources, publish packages with the app, package and generate folder instructions, upload resources to the server, download resources, gamefreamworklist DAT and gameframeworkve
Gameframework: package resources, publish packages with the app, package and generate folder instructions, upload resources to the server, download resources, gamefreamworklist DAT and gameframeworkve
2022-07-23 12:52:00 【Sixi Liyu】
Packaging configuration

On the left for ab package , In the middle ab Package content , On the right is the resource file in the project
Click on save,SaveConfiguration, Saving packaging is related to ResourceCollection.xml in
Whether to use file system , Only in xml Manual configuration in , After downloading, the representative will put several scattered ab Files are combined into one file 
With or without APP Release package
1、AssetBundle list
AssetBundle list (AssetBundle List) Lists all... Included in the project AssetBundle, empty AssetBundle、 scene AssetBundle And non scene AssetBundle Three different icons are used to identify .
Function button description :
① Add new AssetBundle, Specify after clicking AssetBundle The name of ( Including directory name , Use “/” Separate ) And variant names ( Can be empty 、 Use... As needed ).
② Rename the selected AssetBundle.
③ Remove the selected AssetBundle.
④ change AssetBundle How to load , You can choose to load from a file 、 Load from memory , Or decrypt it from memory and load it .
⑤ Mark this AssetBundle Whether it is necessary to follow App Release together , If checked, special processing will be done during packaging .
packed The function should be , pack app, Some resources can be attached to enter app.. Then the heat is based on the server file list and app The package is released to the read-write path after installation packed, Then update the difference
Whether to use file system
Only in xml Manual configuration in , After downloading, the representative will put several scattered ab Files are combined into one file 
How to avoid redundancy
/// <summary>
/// resources .
/// </summary>
public sealed class Resource
{
public List<Asset> m_Assets;
/// <summary>
/// resources .
/// </summary>
public sealed class Asset : IComparable<Asset>
{
private Asset(string guid, Resource resource)
{
Guid = guid;
Resource = resource;
}
If one asset Into the a.bundle, Will change from the original b.bundle remove
bundle:TestNew Insert... Into the asset->{“Guid”:“4a17d2c656f5c6b44a31e3ee547a76b0”
Bundle:DataTables: Cancel asset->{“Guid”:“4a17d2c656f5c6b44a31e3ee547a76b0”,
hit AB package

- You can choose the compression format in the project , The default is GZip
- The version number of resources will increase automatically every time they are packaged 1
- The package output path cannot be in the project Assets/StreamingAssets Catalog , belong assets Package outside the directory
Call in code ResourceBuilderController.BuildResources
Packed folder description
Working Path:Unity Generate AssetBundle Working directory when .
Output Package Path: Directory of files generated for stand-alone mode , If the game is a stand-alone game , After generation, copy the files of the corresponding platform in this directory to StreamingAssets Post build App that will do .
Output FullPath: Directory of the complete package generated for updatable mode , If the game is an online game , After generation, this directory should be uploaded to the resource server , For players to download .
Output Packed Path: Directory of files generated for updatable mode , If the game is an online game , After generation, copy the files of the corresponding platform in this directory to StreamingAssets Post build App that will do . One AssetBundle Whether it will be generated to Output Packed Path, Depends on this AssetBundle Whether in AssetBundle It is marked as Packed.
Packed And Full Folder
AB Bao Hefei AB Package file , stay GF Is unified and abstracted as Resource file , The file suffix is .dat , In our resource list , These are the records .dat Resource information of resource file , The information contains the names of these resource files ,hashcode, length ,zipHashcode,zip length , whether AB package , Load settings , Information, etc. .
" Generate Directory / Packed " ( Stored in this directory is attached APP Resources published together )
“ Generate Directory /Full” ( All resources are stored in this directory )
GameFreamworkList.dat And GameFrameworkVersion.XXXX.dat
GameFreamworkList.dat (Packed in ) and GameFrameworkVersion.XXXX.dat (Full in ) , The total resource information in the game will be recorded in GameFrameworkVersion.XXXX.dat In file , This file exists as a master table of client resources , The processing and operation of resource files and resource information of the game have been subject to this table . and GameFreamworkList.dat The file exists as the current resource record table of the client directory , Only the resource file information under the current directory is recorded .
Need to put Packed All the files under the folder , Copy to project streamingAssets Under the table of contents , Re release APP(ResourceEditor Mark in the panel Resource by Pakeaged The latter one Resource Will be packed to Packed in ). Read only directory GameFreamworkList.dat Only the information of all resource files in this directory is recorded , This information will be used in future resource verification . Resource summary GameFrameworkVersion.XXXX.dat In updatable mode, it can be released without the installation package , Because this file will be downloaded to the read-write directory later .
Every time the application starts , First, you need to get the build number of the current resource master table ( The build number is ResourceBuilder Panel settings . As for the dynamic acquisition process of the build number , In what way , You need to realize it yourself ), Then you can use the latest build number , call
CheckVersionListResult ResourceComponent.CheckVersionList(int latestInternalResourceVersion)
To determine whether the current resource master table is the latest , here CheckVersionList Method will access the read / write directory , And try to read GameFrameworkVersion.XXXX.dat file , If the file does not have or the internal version number of the resource is different from the one you passed in , The enumeration value that the resource needs to update will be returned , Otherwise, it will return without update .
Upload AB Package to server folder
Copy the file in the past 
Create... On the server Version.txt file
The filled content is found in the packaged report 
Find this line , Fill the contents in Version.txt
Version.txt Fill in with
{
"ForceUpdateGame": false,
"LatestGameVersion": "0.1.0",
"InternalGameVersion": 0,
"InternalResourceVersion": 2,
"UpdatePrefixUri": "http://10.12.24.82:10089/Windows",
"VersionListLength": 7138,
"VersionListHashCode": -1969978894,
"VersionListCompressedLength": 2653,
"VersionListCompressedHashCode": 861209557
}
Negative numbers do not affect the use , by crc32 Code to int Negative numbers appear
Unity Use reality ab And update mode


Remote address modification

Change to the server address , The format is as follows
{
“GameVersion”: “0.1.0”,
“InternalGameVersion”: 0,
“CheckVersionUrl”: “http://10.12.24.82:10089/{0}/Version.txt”,
“WindowsAppUrl”: “https://starforce.gameframework.cn”,
“MacOSAppUrl”: “https://starforce.gameframework.cn”,
“IOSAppUrl”: “https://starforce.gameframework.cn”,
“AndroidAppUrl”: “https://starforce.gameframework.cn”,
“END_OF_JSON”: “”
}
Run Download

The downloaded folder can be opened through this 
边栏推荐
- Explanation of websocket protocol
- C #: TOPK: take the largest 100 before 10000 numbers, and sort the heap
- 0回溯/动态规划中等 LeetCode526. 优美的排列
- Nas里搭建Frpc客户端【超级无脑】
- FTP实验及概述
- 强一致性和弱一致性的分析思路以及分布式场景的并发技巧
- HCIP---HCIA知识回顾(一)
- C custom queue set
- unity3d:Assetbundle模拟加载,同步加载,异步加载,依赖包加载,自动标签,AB浏览器,增量打包
- Unity3d:UGUI,UI与特效粒子层级,2018.2以上版本BakeMesh,粒子在两个Image之间且在ScrollView
猜你喜欢

Learning diary - (routing and switching technology) dynamic routing (RIP protocol) and static routing

Hcip - first experiment

Hcip--- BGP related configuration (Federal chapter)

学习日记——(路由与交换技术)网络地址转换 NAT技术

Explanation of websocket protocol

unity3d:Assetbundle模拟加载,同步加载,异步加载,依赖包加载,自动标签,AB浏览器,增量打包
![[AUTOSAR storage stack NVM]](/img/7a/15e01f8ace647b55e11e764dba1b64.png)
[AUTOSAR storage stack NVM]

C custom queue set

路由与接口技术——直连网络总结

C # custom stack
随机推荐
0双指针 LeetCode844. 比较含退格的字符串
Routing and interface technology -- Summary of direct network
HCIP-HCIA知识回顾(二)
Basic knowledge of high voltage technology
LSM-tree(Log Structured-Merge Tree)的理解
Understanding of LSM tree (log structured merge tree)
Delete node in binary sort tree
[bootloader architecture and brushing process based on UDS service]
详解TCP的交互数据流和成块数据流
强一致性和弱一致性的分析思路以及分布式场景的并发技巧
C # custom bidirectional linked list
直白理解一文搞定http协议缓存
Analysis of Internet Protocol (II)
Hcip--- BGP related configuration (Federal chapter)
htpasswd作用
HCIP---BGP ---边界网关协议
Analysis of Internet Protocol (I)
前缀和 LeetCode2100. 适合打劫银行的日子
Instant messaging websocket
Unity3d: special effect object pool, timeout delete GameObject in the pool, GC weight