MZuex Posted May 21, 2018 Share Posted May 21, 2018 Hi, Am trying to get text data from a JSON file which I've loaded using : this.load.json('textInfo', 'js/textInfo.json '); however, I can't access the data using the code I had working in phaser2 getInfo = JSON.parse(this.cache.getText('textInfo')); and the JSON examples folder on the phaser site is empty, can someone help me out with this please? Link to comment Share on other sites More sharing options...
samme Posted May 21, 2018 Share Posted May 21, 2018 this.cache.json.get('textInfo'); eg http://labs.phaser.io/edit.html?src=src\game objects\particle emitter\create emitter from JSON.js MZuex, OneSillyLion and kanatos-kun 3 Link to comment Share on other sites More sharing options...
eddieone Posted December 20, 2018 Share Posted December 20, 2018 Think it will work for an api? Link to comment Share on other sites More sharing options...
rSilva28 Posted March 26, 2020 Share Posted March 26, 2020 On 5/21/2018 at 9:52 PM, samme said: this.cache.json.get('textInfo'); eg http://labs.phaser.io/edit.html?src=src\game objects\particle emitter\create emitter from JSON.js I know that this was not the subject, but how can we change the value of an object in a JSON file using phaser 3? Link to comment Share on other sites More sharing options...
Recommended Posts