Jump to content

Remove cache from atlasJSONHash


fitness23
 Share

Recommended Posts

I have successfully loaded in a number of pngs and json files by using the following in a loop through JSON:

this.game.load.atlasJSONHash(gameData.npc[i].animID, "assets/images/npcs/"+gameData.npc[i].animImagePath+"", "js/npcs/"+gameData.npc[i].animDataPath+"");

Then I am successful in removing the sprite from the scene using the following:

item.destroy();

However when I try to then remove the png and json atlas json files from the cache, it errors, any ideas? I am using the following:

this.game.cache.removeTextureAtlas(gameData.npc[i].animID);
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...