- UWP - Xbox Live Programming Guide
- Xbox-Live-Integration Class Library (V1.0 01/04/2018)
- UWP Sample
- Unity based UWP sample
- Partner Unity UWP Sample Assets (2018 Jan Release)
Firstly, please note that the official Unity plugin for ID@Xbox developers that linked to here in Step 6.
The code logic of this sample assets is based on xbox-live-unity-plugin to support Creators Program and ID@XBOX Program Partner. Most API surfaces are remained the same.
In this assets, we used xbox-live-api instead of the original Xbox Live libraries (e.g. Microsoft.Xbox.Services.UWP.CSharp.dll), so that we can use achievements and some other features that is not supported in Xbox Live Creators Program. However, as we used WinRT APIs, there will be no placeholder data when playing in the editor.
This sample assets is still under developing. For now, it only demonstrates SignIn and Profile, Stats, Leaderboards and Achievements. Developers can refer to this sample assets and develop your own implementation.
Check out the Wiki for details
.Net wrapper for Xbox Live SDK for UWP
XboxLiveIntegration(Class Library) code map
Shows how to use XboxLiveIntegration lib to intergrate Xbox Live service with the UWP app
- Apply ID@Xbox / Register UDC
- Preparation on UDC
- Preparation on XDP
- Associate UDC product with the XDP title
- Configuring your development PC (Sandbox Setup)
-
If you download the samples ZIP, be sure to unzip the entire archive, not just the folder with the sample you want to build.
-
Start Microsoft Visual Studio 2015 and select File > Open > Project/Solution.
-
Starting in the folder where you unzipped the samples, go to the Samples subfolder. Double-click the Visual Studio Solution (.sln) file.
-
There are three missing files
-
Double-click Package.appxmanifest file and navigate to Packaging page, click Choose Certificate... button
-
Click Configure Certifacte... -> Create test Certificate -> Fill password for test certificate -> Click OK button
-
Associate app with the Store
From the Project menu in your Visual Studio solution, choose "Store > Associate App with the Store"
See Microsoft Doc
-
Edit the xboxservices.config JSON file, replace the
TitleId
,PrimaryServiceConfigId
with the values you get from Windows Dev Center(UDC) -
Rebuild the sample project and ensure the
Microsoft.Xbox.Live.SDK.WinRT.UWP
(version 2016.11.161031.1) nuget package is installed. Right-click XboxUWPApp1 project > Manage NuGet Packages... > Installed -
Select "x64" from the configuration dropdown in the toolbar of Visual Studio.
-
Press Ctrl+Shift+B, or select Build > Build Solution.
The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it.
-
Deploying the sample
- Select Build > Deploy Solution.
-
Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or select Debug > Start Without Debugging.
Shows how to use XboxLiveIntegration lib to intergrate Xbox Live service with the Unity based UWP app. This sample is based on the official Unity demo: Tanks.
Most of code changes are in the GameManager.cs file, Path: Assets_Completed-Assets\Scripts\Managers\GameManager.cs
- Apply ID@Xbox / Register UDC
- Preparation on UDC
- Preparation on XDP
- Associate UDC product with the XDP title
- Configuring your development PC (Sandbox Setup)
- Unity 5.6.0f3 (64-bit)
- VS2015 Update3
- Windows 10 RS1
-
Download the Tanks project: https://www.assetstore.unity3d.com/en/#!/content/46209/
-
Open the _Complete-Game scene in Unity Editor, replace the Assets_Completed-Assets\Scripts\Managers\GameManager.cs file with Samples\Tanks\GameManager.cs file
-
In the Unity Editor, Open Assets/Plugins, drag Microsoft.Xbox.Services.winmd and XboxLiveIntegration.dll into to Assets hierarchy. Change Importing settings for XboxLiveIntegration.dll. Select this item and change setting as follows
-
File -> Build Settings -> change settings as below
Please notice that, for UWP SDK setting, if you choose the Latest installed option and the Windows version is RS2(15063), please ensure VS2017 is installed. Otherwise, please choose 10.0.14393.0.
-
Start Microsoft Visual Studio 2015 and select File > Open > Project/Solution, choose the UWP project we just generated. We will see three porojects in this solution. the first two projects are auto-generated, we need to do some changes in the third UWP project:
-
Install XBL Nuget package for your UWP project. Search for "xbox live" in the "Manage NuGet Packages" page. Select the appropriate API set (C++ or WinRT), choose version 2016.11.161031.1 and then click on “Install”
-
Associate the UWP project with your Xbox Live enabled title information
-
Create a JSON file and name it xboxservices.config
-
Add the JSON file to your primary UWP project (the StartUp Project)
-
Right click on the file, select Properties and ensure that Build Action is set to Content and set Copy always for Copy to Output Directory. This will ensure the file is copied correctly in the AppX folder.
-
Edit the JSON file with the following template, and replace the TitleId, PrimaryServiceConfigId with the values you get from Windows Dev Center(UDC)
{"TitleId": xxxxxx, "PrimaryServiceConfigId": "exxxx-7xxx-4xxx-axxx-3609xxx" }
-
-
Associate publisher information with your UWP App
- Open your project in Visual Studio 2015
- Right click the primary UWP project (the StartUp Project), click Store -> Associate App with the Store…
- Sign-in with the Windows Developer account used for creating the app if asked
- On the next page, select the app you just created, confirm the information, and click Associate
-
Enable Internet (Client) capability
- Double click on the package.appxmanifest file in Visual Studio 2015 to open the Manifest Designer.
- Click on the Capabilities tab
- Click on Internet (Client)
- Close the file and save the changes
-
Add Xbox Extensions for the UWPRight-Click project, Add -> Reference…Universal Windows -> Extensions -> Select Xbox Extensions for the UWP
-
Select "x64" from the configuration dropdown in the toolbar of Visual Studio