Prepare your project to support in-app purchases for XBOX on Windows
Install required packages, set up add-ons in Microsoft Partner Center, and configure Unity Editor settings before implementing in-app purchases.
읽는 시간 3분최근 업데이트: 23일 전
Install the required Unity packages, create add-ons in Microsoft Partner Center, and configure Unity Editor settings to prepare your Unity project for XBOX Store purchases.
Prerequisites
Before you implement in-app purchases, verify your project meets the following requirements:
Development environment:
- Unity Editor: 6000.0 LTS or later
- Game Development Kit (GDK): April 2025 GDK v2504.0.4020 or later
Unity packages:
Install the following packages:
- Microsoft GDK API package: 1.3.0 or later
- Microsoft GDK Tools package: 1.3.0 or later
- In-App Purchasing package: 5.3.0 or later
1. Configure Microsoft Partner Center
Before implementing in-app purchases, verify the following configurations in Microsoft Partner Center:
- Title ID or Service Configuration ID
- Device families selected for publishing
- Sandbox configured with test accounts
For more information, refer to the Microsoft documentation on Product setup.
Enable Microsoft Store Services (Optional)
To enable Microsoft Store Services, go to Product collections and purchases, and enter the client ID of your game back end.
Create add-ons for Unity IAP
Add-ons represent the products you want to sell in your game.
-
Go to Add-ons and create add-ons that match the product types in the IAP package.
IAP ProductType
Microsoft Partner Center Add-on
XStoreProductKind
Consumable Consumable (Developer-managed) UnmanagedConsumable Non-Consumable Durable Durable Subscription Subscription Durable (EndDate property is set) -
For each add-on, configure the following settings:
- Content type: Electronic software download
- Microsoft Store listing: Doesn’t have its own Microsoft Store listing
-
In the Identity details section, note the Store ID for each add-on.
2. Configure Unity Editor settings
Configure Microsoft GDK packages and enable Unity IAP to prepare your project for XBOX Store integration.
Set up GDK packages
-
In the Unity Editor, go to> Microsoft GDK and enable Build for Microsoft GDK for each target platform.Project Settings
?
-
Ensure a GDK Settings asset is active, and configure the Microsoft Game Config asset with IDs that match the ones in Microsoft Partner Center.
-
Go to Project Settings > Player > Other Settings and verify that the Scripting Define Symbols includes.
MICROSOFT_GDK_SUPPORT
Set up IAP package
- Enable and configure the IAP service for your project. For more information, refer to the IAP package documentation on Get started with Unity IAP.
- Verify if the current targeted store is XBOX Store.
After completing the Microsoft Partner Center and Unity Editor configuration, implement the purchase workflow in your Unity code.