How to create item bundles using Asset Packages in Unity

Author image
Johannes Fornaeus3 min read
Cover image

Asset packages are a great way to add multiple types of rewards to your players’ inventories – like a buy-one-get-one-free type deal, or a complete set of armor, for example. You can use them for pretty much anything, e.g. loot in chests, prizes for winning contests, or starting bundles (among other things). If you’re not sure how to use asset packages, don’t worry – this article has everything you need to know.

Before we get into that

Before we begin, make sure you've created your free LootLocker account, and installed and configured the Unity SDK into your game project.

You’ll also need to understand a few other LootLocker concepts before you can get going with asset packages. Don’t worry, it’s nothing complicated. Just make sure you’re familiar with:

Happy? Let’s get started.

Asset package basics

Asset packages are pretty straightforward – they’re containers that you add assets to (there’s a big clue in the name).

How to create an asset package

The good news is that this is super easy. And it’s the same set-up as all the other LootLocker complexities, so you might already be familiar with it. Just follow these steps.

  1. Head to “Settings” then “Contexts”, and click “Create Context”. Give the context a name, and change the complexity to “Customization Package (Asset Package)”.

  • Next, you’ll need to create a new asset package asset (that’s a lot of “assets”, we know). Go to “Content” then “Assets”, then click “Add Asset”. Give it a name and assign it the context we created in the previous step.
  • You’ll now see a new tab called “Package Contents”. Click the green “Add Content to Package” button and add the assets you want the player to get with this package (don’t forget to save it). Et voilà – all of those will be added to their inventory when they receive the package.
  • How to implement asset packages in Unity

    Here’s an example using a trigger that rewards players with a full set of armor.

    When the player clicks this button we run LootLockerSDKManager.TriggeringAnEvent() and sends in the name of our trigger. This will add all the assets in our asset package to the player’s inventory.

    And that’s it – asset packages, sorted.

    Need some help?

    So you now know everything there is to know about asset packages. Don’t forget LootLocker has lots of other easy-to-use features as well – check out our guides to find out more.

    Any questions?

    We’ll be happy to help you out on Twitter or Discord. And if you like these guides (or even if you don’t), let me know with a tweet.

    Stay up to date.

    Join our newsletter and get these posts sent directly to your inbox.