目前游戏结构是:
大厅场景+各种游戏的预制体.
公司坐标:厦门.
Creator 2.x热更新也是使用AssetsManager做下载,与1.x区别是2.x的构建资源文件名变成了uuid。
只要找到Assets资源与build资源的对应关系就好办了。
我这里做了一个Creator的插件,在构建后可以生成一个assets-map.json文件,格式如下:
[
{
"nativePath": "res/raw-assets/22/224ce6e8-0e32-430a-9807-9452fc769ac9.png",
"url": "res/atlas/emoji.plist/emoji1.png"
},
{
"nativePath": "res/raw-assets/22/224ce6e8-0e32-430a-9807-9452fc769ac9.png",
"url": "res/atlas/emoji.plist/emoji2.png"
},
{
"nativePath": "res/raw-assets/22/224ce6e8-0e32-430a-9807-9452fc769ac9.png",
"url": "res/atlas/emoji.plist/emoji3.png"
},
{
"nativePath": "res/raw-assets/83/83e05166-d611-452a-ac2f-4cbf5c3d5a06.png",
"url": "res/atlas/sheep.plist/sheep_down_0.png"
},
{
"nativePath": "res/raw-assets/83/83e05166-d611-452a-ac2f-4cbf5c3d5a06.png",
"url": "res/atlas/sheep.plist/sheep_run_0.png"
},
]
url是资源在编辑器中的路径,nativePath是文件构建后的路径。
插件仓库:https://github.com/ShawnZhang2015/assets-map
如果有兴趣还可以参考这篇GitChat文章《Cocos Creator 集合类游戏模块化与热更新实践
》
1赞
mark
上面的是大佬
已完成,
需要 了解细节的 可以加我wechat:lowkey3636
easy