Correct loading of nested pack file

Hi everyone.
I can’t find real world examples for loading nested pack files.
Basic example

{
  "desktop": {
    "path": "./src/assets/images",
    "files": [{
      "type": "image",
      "key": "gamescene_background",
      "url": "maingame_screen.png"
    }]
  },
"meta": {
  "generated": "1401380327373",
  "app": "Phaser 3 Asset Packer",
  "url": "https://phaser.io",
  "version": "1.0",
  "copyright": "Photon Storm Ltd. 2018"
}
}

Then I need to add one more level

{
  "desktop": {
    "regular": {
      "path": "./src/assets/images",
      "files": [{
        "type": "image",
        "key": "gamescene_background",
        "url": "maingame_screen.png"
      }]
    },
    "vip": {
      "path": "./src/assets/images",
      "files": [{
        "type": "image",
        "key": "gamescene_background",
        "url": "maingame_screen.png"
      }]
    }
  },
  "meta": {
    "generated": "1401380327373",
    "app": "Phaser 3 Asset Packer",
    "url": "https://phaser.io",
    "version": "1.0",
    "copyright": "Photon Storm Ltd. 2018"
  }
}
...
        this.load.pack('pack', './src/configs/pack.json', 'desktop.regular');

And it doesn’t work. What am I doing wrong?

You can’t nest sections.

You could make separate pack files, or you could name sections like desktop.regular.

@samme Weird. I thought that this example just means such use of this functionality. This is clearly not the case. But then what exactly is shown in this example? How can this be used?


pack - Phaser 3 API Documentation (beta)

I guess it’s a mistake. :slight_smile: