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 can generate one in the Shopify admin. Alternatively, you can create a custom app and use authorization code grant.
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.
SDK Alternatives
Anchor link to section titled "SDK Alternatives"The Unity engine provides robust APIs for performing HTTP requests which you can use with our Storefront GraphQL API. Below is an example of performing a simple GraphQL query.
Where to get help
Anchor link to section titled "Where to get help"Visit our forums to connect with the community and learn more about the Shopify API and App development.
Find a Shopify Partner for hire in our ecosystem of talented development agencies.