I’ve just created my first json asset pack, images are loading as I wish
Just curious, I wish to add some additional text content to the game objects within the json file, say like a characters name, which I want to pull through and display in game.
Can i do this within the original call to the json pack:
this.load.pack(‘main’, ‘assets/pack.json’);
Or does it require a second call (using load.json), like:
I believe you’d need to parse your JSON file with the additional metadata on your own, perhaps iterating through it to find the matching asset key and assigning the character name. You could also possibly extend the loader class, if you’re comfortable doing that.