Structure of a bundle found in a AssetsManifest file. Bundles allow you to group related assets together for easier management and loading.
// Basic bundle structureconst bundle: AssetsBundle = { name: 'level-1', assets: [ { alias: 'background', src: 'level1/bg.{webp,png}' }, { alias: 'sprites', src: 'level1/sprites.json' } ]};// Using object format for assetsconst bundle: AssetsBundle = { name: 'ui', assets: { button: 'ui/button.png', panel: 'ui/panel.png', icons: ['ui/icons.webp', 'ui/icons.png'] }}; Copy
// Basic bundle structureconst bundle: AssetsBundle = { name: 'level-1', assets: [ { alias: 'background', src: 'level1/bg.{webp,png}' }, { alias: 'sprites', src: 'level1/sprites.json' } ]};// Using object format for assetsconst bundle: AssetsBundle = { name: 'ui', assets: { button: 'ui/button.png', panel: 'ui/panel.png', icons: ['ui/icons.webp', 'ui/icons.png'] }};
Assets contained in the bundle. Can be an array of assets or a record mapping aliases to sources.
Unique identifier for the bundle
Structure of a bundle found in a AssetsManifest file. Bundles allow you to group related assets together for easier management and loading.
Example
See