Reputation: 1546
I want to load resources in loading scene between scenes. I read they suggest preLoad
but I have no idea to use it. Can you explain for me how it works?
Can you give me some detail example? Thanks
Upvotes: 0
Views: 3387
Reputation: 358
After a long time of study i found that you can do that using: Sequence Action I got it working now in v-3x.
Upvotes: 1
Reputation: 43349
You can create a loading scene and load Images asynchronously using CCTextureCache::sharedTextureCache()->addImageAsync(...)
method. It will add all images to shared texture chache. Whenever you create any Sprite or Texture it looks for key in CCTextureCache
if there already a key exist then it will not load image again.
Alternatively you can remove textures from TextureCache using specific key name or all texture or unused ones.
Check API Here :
Upvotes: 2