geros Posted October 14, 2015 Share Posted October 14, 2015 HI, I have loaded my assets for my state like : this.game.load.pack('game', null, assets); Inside there i have an entry for an atlasJSONHash { type: 'atlasJSONHash', key: 'images', textureUrl: 'images.png' }The atlas is loaded just fine and i can use it without problem. My Atlas json file is a custom one since i pass some extra values that i want to read later on for some calculation and i don't know how to do it. If re load the json from scratch i get one more request so i end up with two images.json files clientside. The key "images" is available from cache but i cannot have this.game.cache.getJSON('images');it returns with "haser.Cache.getJSON: Key "layout" not found in Cache." Any idea ? Thanks! Link to comment Share on other sites More sharing options...
rich Posted October 14, 2015 Share Posted October 14, 2015 I don't completely get what you're after - but I think you want to use your own json file for the atlas data, and then get access to that json at a later date from the cache? Link to comment Share on other sites More sharing options...
geros Posted October 27, 2015 Author Share Posted October 27, 2015 Hi Rich , I am sorry for the late response.The question is still valid. I want to retrieve the atlas json file because i have patched it and i pass more info inside . Link to comment Share on other sites More sharing options...
hexus Posted October 24, 2017 Share Posted October 24, 2017 On 14/10/2015 at 2:23 PM, rich said: I don't completely get what you're after - but I think you want to use your own json file for the atlas data, and then get access to that json at a later date from the cache? Yeah, that seems to be the case. I've tried to do this before, I think (or something similar) and realised that the actual JSON was discarded by the loader. As such, I just provided the data I needed separately and I explicitly load it as a JSON file so I can retrieve it from the cache later. This is what I'd suggest for you, @geros. Load your extra data for the atlas separately and match it up once everything has loaded. Edit: Sorry for the necro, I misread the dates. This was brought up in the Phaser Slack. Link to comment Share on other sites More sharing options...
Recommended Posts