Project option configuration
Do not use the default unity parsing method for json file parsing. There is a problem with unity parsing. Use StarForce.LitJsonHelper to change the resource
mode to hot update mode.
Configuration file configuration
The BuiltinDataComponent custom component references the Buildinfo.txt configuration file, which configures the hot update path, version number and other information.
The version.txt file will then be downloaded from the server according to the configured path. The content of version.txt is as follows, including the latest version number and resource path. After
the download completed, the game will compare the version numbers of the local version and the version version to see if there are any changes. If there is a change, the version resource verification file GameFrameworkVersion.dat will be downloaded from the server path loaded by the UpdatePrefixUri resource. Note that CRC32 is added here as the check code. Please create and fill in the
version.txt
Please find the file list length, hash value, CRC32 check code length and hash value from the ab resource generation log BuildLog.txt, and copy them over.
{ “
ForceUpdateGame”: false, “LatestGameVersion”: “1.1.2”, “ InternalGameVersion”: 2, “InternalResourceVersion”: 2, “ UpdatePrefixUri”: “”, “VersionListLength”: 11482, “ VersionListHashCode”: -2118920274, “ VersionListCompressedLength”: 4394, “VersionListCompressedHashCode”: -93644609 }
Note: You need to check the full path path configuration when building ab, otherwise there will be no corresponding parameter log output in BuildLog.txt, and there will be no corresponding ab resource.
Server
resource resource addition
The game will compare which resources are different from the local ones based on the GameFrameworkVersion.dat file, and then download the corresponding files from the server to overwrite the local files. Therefore,
the server only needs to save the latest version of resources, and the GF framework will automatically compare the incremental files to complete the hot update work. Copy
the complete ab resources of the corresponding platform in the Full directory to the configured resource download path for
downloading