Can I dynamic load resource from outside of resources folder?

I want to dynamic load resources from outside of resources folder .

I already read this url.

http://cocos2d-x.org/docs/api-ref/creator/v1.3/classes/loader.html#method_loadRes

Is there any other way?

I also need help to solve this issue.

In my case,
My program has many resources files. They are loaded dynamically via script.
So many files are in ‘resources’ folder because of CocosCreator’s rule.
In case of Unity, Unity has not that rule. This point is a litte inconvenient. But I like CocosCreator. :slight_smile:

If I build in android, ‘resources’ folder’s files are go into .apk file. So .apk file is too heavy.
SO I can not put in ‘resources’ folder because of apk file size. Also I don’t want to player has all files in storage.

I need to patch some of them, not all files. And then patched files are saving in storage.

I already knew, XMLHttpRequest method. I think ‘XMLHttpRequest method’ is not solver to my issue.

Can anyone help?

Have you managed to find a solution to load remote resources and store in the device storage, then load as asset?

You absolutely can.

  • First, create a node
  • Create a new Script, drag this script in node that created at step 1
  • In script, create some spriteFrame in properties
  • Drag your image to script (Step 2), when node loaded, all images will loaded