How to hot update with CocosCreator(AssetsManager)?


#1

Hi… i am shifting our game in cocos creator, our game uses AssetsManager but there is no documentation or tutorial on how to integrate AssetsManager in Cocos Creator…

please direct me to a tutorial or documentation… or you can give me an example thanks


Assets Manager / Hot Update in Cocos Creator
#2

It’s pretty much the same thing, we have a Chinese tutorial and a sample project, however it haven’t been translated to English yet.

Anyway, you can take a look :

Be noticed, I provided a simple Node JS script to scan the assets and give back the manifest automatically

Usage:

> node version_generator.js -v 1.0.0 -u http://your-server-address/tutorial-hot-update/remote-assets/ -s native/package/ -d assets/
  • -v Indicate Manifest main version
  • -u Indicate remote package url
  • -s Local native build path (relative)
  • -d Path to store the output manifest file

#3

thanks for the help… you guys are great :smile:


#4

@pandamicro can we include the prefabs in the manifest file for hot update?


#5

@pandamicro what is the use of import folder in the project.manifest? is it required?


#6

yes of course.

import folder is needed, some of the assets will be imported to the asset library, and the imported data is used directly by the final program.


#7

@pandamicro i have a question…
what if i have levels that are not entirely part of my game… like a level that will only be included when the game downloads it from the server… This level is not associated in the import folder…

There are assets that are not in the game initially when it is build… and these assets will only available optionally… is it possible in the cocos creator hot upadate?
from what i understand is that all updatable assets are some what associated in the import folder(dont know how it works)… what im i missing here?.. thanks


#8

HOW - update logic game from server ?


#9

@pandamicro

As per the tutorial, remote-assets/src contains only js files.

But, Cocos Creator is generating jsc files.
So, my question is ; will JSC files work the same as JS in hot update?

JS works fine for sure as I used for a project with hot update; created with Studio.

Haven’t tested myself yet with Creator.
Just wanted to make sure I understood the flow correctly. :slight_smile: