Unity Buy SDK
You can use the Unity Buy SDK to integrate physical products directly into games and apps made with the Unity game engine.
Requirements
Anchor link to section titled "Requirements"- You've created a development store or have a production store.
- You've created products or collections in your store.
Step 1: Generate an access token
Anchor link to section titled "Step 1: Generate an access token"To generate an access token, you create a custom app either using OAuth or in the Shopify admin.
The access token is generated when you install the custom app. You include the access token with any requests made from your app to Shopify.
Step 2: Make your products and collections available
Anchor link to section titled "Step 2: Make your products and collections available"After you've generated an access token, you need to make products and collections available to your custom app to access them from your app. After the products and collections are available, you can retrieve them using their respective IDs.
Make a product available
Anchor link to section titled "Make a product available"- From your Shopify admin, go to Products.
- From the Products page, click the product you want to make available.
- Next to SALES CHANNELS AND APPS click Manage.
- In the Sales channels and apps dialog box, select the box next to the name of your custom app.
Make a collection available
Anchor link to section titled "Make a collection available"- From your Shopify admin, go to Products and click Collections.
- From the Collections page, click the collection you want to make available.
- Next to SALES CHANNELS AND APPS click Manage.
- In the Sales channels and apps dialog box, select the box next to the name of your custom app.
Step 3: Access the Unity Buy SDK
Anchor link to section titled "Step 3: Access the Unity Buy SDK"Using the Unity Buy SDK, you can do the following:
- Fetch information about products on your Shopify store
- Create an in-game shopping cart where customers can add products
- Generate a checkout for customers to purchase products
When you're ready to start building, explore the examples in GitHub to see how to implement the SDK in your app.
Selling merchandise in your game
Anchor link to section titled "Selling merchandise in your game"The Unity Buy SDK enables a fully customizable experience, allowing you as a game developer to place physical products for sale at any point during the game experience.
With so many options, it can be tough to decide where to start. The following examples show some of the best ways to sell merchandise in your game.
Create an in-game gift shop
Anchor link to section titled "Create an in-game gift shop"The most basic merchandise experience is the native in-game storefront. Allowing players to browse and purchase merchandise as they would on an online web-based store.
On July 20, 2017, award-winning indie game Alto’s Adventure released an update including an in-game gift shop that made merchandise discoverable and purchasable inside the game using the Unity Buy SDK. Over the first 30 days, the game doubled its previous year's merchandise sales and saw 75% of new sales come through the in-game storefront.
Read the full Alto's Adventure Gift Shop case study here.
Bring player-generated content to life
Anchor link to section titled "Bring player-generated content to life"The concept of user-generated content (UGC) is familiar when thinking about digital content. Games like Little Big Planet, Minecraft, and Trials Evolution have shown how players enjoy being creative and making the game their own.
This UGC can be transferred to the physical world, letting players create unique products that remind them of their play experience.
Reward achievements with exclusive products
Anchor link to section titled "Reward achievements with exclusive products"Merchandise and collectables are a great way to reward players and celebrate in-game achievements.
Exclusive pieces of merchandise can be unlocked in-game, allowing you to surprise and delight your players in new and exciting ways.
Where to get help
Anchor link to section titled "Where to get help"This SDK is not supported by Shopify support, but there are other places where you can get help.
You can open an issue in the GitHub repository.
Visit our forums to connect with the community and learn more about the Shopify API and App development.
Find a Shopify Expert for hire in our ecosystem of talented development agencies.