• GameFramework:打包资源,上传资源至服务器,下载资源


    打包配置

    在这里插入图片描述

    左边为ab包,中间为ab包中内容,右边为项目中资源文件
    点击save,SaveConfiguration,保存打包关系到ResourceCollection.xml中
    是否使用文件系统,只能在xml中手动配置,代表下载完后会把几个零散的ab文件合成一个文件
    在这里插入图片描述

    打AB包

    在这里插入图片描述

    1. 可以选择项目中的压缩格式,默认的是GZip
    2. 每次打包资源版本号会自增1
    3. 打包输出路径不能为项目里Assets/StreamingAssets目录,应该在assets目录外打包
      代码中调用ResourceBuilderController.BuildResources

    上传AB包到服务器文件夹

    复制文件过去
    在这里插入图片描述

    服务器中创建Version.txt文件

    填充内容在打包报告中找
    在这里插入图片描述

    找到这行,把里面内容填充到Version.txt
    在这里插入图片描述

    Version.txt填充为

    {
    	"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
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11

    出现负数不影响使用,为crc32码转为int出现的负数

    Unity使用真实ab与更新模式

    在这里插入图片描述
    在这里插入图片描述

    远程地址修改

    在这里插入图片描述

    改为服务器地址,格式如下
    {
    “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”: “”
    }

    运行下载

    在这里插入图片描述

    下载完的文件夹可以通过这个打开
    在这里插入图片描述

  • 相关阅读:
    【老生谈算法】matlab在材料力学中的应用
    C语言代码的编译过程及命令
    Centos 搭建MQTT
    《FFmpeg Basics》中文版-11-格式之间转换
    嵌入式可以做什么工作?
    rabbitmq-exporter部署方式
    @TableField(fill = FieldFill.INSERT)这个注解的作用
    C语言进阶第五课-----------字符函数和字符串函数
    【Excel VBA】深入探索VBScript中的Choose函数
    左移运算符重载
  • 原文地址:https://blog.csdn.net/luoyikun/article/details/125628986