Deploying to XBOX One with the XBOX Live Creators Program and Unity

xbox-header.png

1. Introduction

The purpose of this article is to create a Universal Windows Platform game application that is built to run on the Microsoft XBOX One game console. Consoles currently hold a 25% stake (~$34.6 billion) in the global games market. (Wijman, 2018) By developers limiting their development experience to Windows PC only titles, they are missing out on a quarter of the global games market. While building a game and deploying to a console might seem difficult, Unity and Microsoft have partnered to create an extremely simple workflow that is already built into Unity. This article is intended to help them generate exposure with console development through Unity and the XBOX Live Creators Program.


2. Background

The Universal Windows Platform (UWP) is an API created by Microsoft for use in developing platform independent, universal applications for Microsoft products including Windows 10, HoloLens, and XBOX One. (Universal Windows Platform, n.d.) Unlike traditional API’s, UWP aims to create a common app platform for every device that is running Windows 10 through different Extension SDK’s that feature native Windows 10 functionality such as Cortana, Windows Timeline, XBOX Live integration, and more. (What's a Universal Windows Platform (UWP) app? - UWP app developer, 2018) Primarily, UWP is used by game developers as the build target for lightweight XBOX One applications. In this article, we will utilize UWP and the Windows Gaming interface to deploy to the XBOX One platform.

The XBOX Live Creators Program allows you to publish your games to XBOX One and Windows 10 quickly and directly. The certification process is simple, and no concept approval is required. If your game integrates Xbox Live and follows the standard Store policies, you are ready to publish. (About the XBOX Live Creators Program, n.d.)

Find more information about the XBOX One Creators Program here.


3. Project Challenges

Given the mid-tier system requirements of the XBOX One, there are certain considerations that need to be made in both game design and technology. (System resources for UWP apps and games on Xbox One, 2017) Screen scaling and resolution, branding, and optimization are crucial to ensuring the player gets the best experience possible.

With the shift to UWP, XInput was no longer supported in that API and therefore, was no longer supported on the XBOX One console. Unity’s default input system has the ability to handle standard gamepad input for UWP but the framework and structure of this input system is not user friendly, cumbersome, and lacks gamepad rumble support.

This method of building a UWP project is intended for lightweight apps and games are not given the full resources they would by building directly for the XBOX One console. Because of this, there are some technical limitations for what can and cannot be done.


4. Prerequisites

Unity prerequisites

  1. Windows 10

  2. Unity

    • Unity: Unity versions 5+ support the UWP API. Ensure that the Windows Store .NET and IL2CPP Scripting Backends are installed with Unity.

  3. Visual Studio 2017 and Unity must have the correct packages enabled

    • Visual Studio: For best results, the 2017 version of Visual Studio should be used.

    • Universal Windows App Development Tools: Modules found in the Visual Studio Installer.

  4. Windows 10 SDK

    • Note: At the time of this publication, version 1809 (servicing release 10.0.17763.132) is being used

  5. XBOX Live Creators Program Account

  6. Xbox Live/Microsoft Account

UWP Settings from Unity Hub

UWP Settings from Unity Hub

UWP Settings from Unity Installer

UWP Settings from Unity Installer

Registering the Xbox One

Preparing your Xbox

  1. Turn on your Xbox One, it will take a few minutes to setup

  2. Sign into/create your Xbox Live/Microsoft Account

  3. Once on the Dashboard Home, press the Xbox button on the controller, open the Store

  4. Use the Y button on the controller top search the “Dev Mode Activation” app

  5. Download and run the app

Registering on the Web

  1. Follow the link provided by Microsoft for the Creators Program to the Developer Dashboard

  2. Click the settings gear (top right corner of screen) and select “Account Settings”

  3. In the left-hand menu, select “Dev Devices” and “Xbox One development consoles”

  4. Click “Enter activation code.”

  5. Enter the code provided by the Dev Mode Activation app


5. Building a solution

PublishingSettings.PNG
BuildSettings.PNG
  1. Ensure that the Windows Store .NET and IL2CPP Scripting Backend features have been added to your Unity install

  2. Ensure that Visual Studio 2017 has been installed and is set as the target for Unity

  3. Create a project

  4. Ensure that your Publishing settings are correct in the Player Settings in order to build a correct WSACertificate.

    • Note: They can be accessed by Edit -> Project Settings -> Player -> Publishing Settings.

  5. Go to File -> Build Settings, select Universal Windows Platform (UWP) NOT XBOX One, and use the Switch Platform button to switch the target platform to UWP

  6. Select appropriate settings for your build

    • Note: In order to build and successfully deploy to XBOX One some specific settings are required.

      • Build Type: D3D (Direct3D)

      • SDK: latest installed (10.0.17763.132 - see above prerequisites)

      • Visual Studio Version: latest installed (Visual Studio 2017 - see above prerequisites)

  7. Build for Universal Windows Platform (UWP)

    • Note: This creates a Visual Studio solution (.sln).

  8. If you haven’t downloaded it already or included it in your install, Unity should open a Unity download for the Windows Studio UWP components. Install this, it should be about 5GBs

Result.PNG

6. Deploying to XBOX One

IP.PNG
  1. Launch the XBOX Developer Dashboard on the XBOX One

  2. Open the Visual Studio .sln in Visual Studio 2017

  3. Change the Visual Studio architecture to x64

  4. In the Play button settings of Visual Studio (dropdown arrow) and select “Remote Machine”

  5. Go to Project -> Properties -> Debugging and select Remote Machine from the dropdown

  6. In the “Machine Name” field, enter the IP address from the XBOX Developer Dashboard

    • Note: The first time you connect, it may ask for a Visual Studio Pin. Enter the pin found on the Xbox Developer Dashboard after selecting “Show Visual Studio Pin.”

  7. Deploying may take a while as it is pushing the content over the network. Your first deployment will take longer as there will likely be missing libraries

  8. Your app should show up on the Developer Dashboard

    • Note: Select to open if it does not do so automatically.


7. Iteration steps

Many of the steps listed above only need to be done on an apps first launch. The steps below outline the common steps used when developing a project.

  1. File -> Build Settings and build for Universal Windows Platform (UWP)

  2. Open the Visual Studio .sln in Visual Studio 2017

  3. Build the Solution (F6)


8. Notes

This guide should be used in combination with your own research.

There may be pieces of information that become outdated and I will do my best to update them

Marketing assets can be setup through the Player settings or added to the ProjectName/Assets folder in the root of the UWP build.

When rebuilding a Visual Studio Solution (.sln) for UWP from Unity, there may be build errors related to the IL2CPP Scripting Backend.           

  • Steps to solve this

    • Close the .sln

    • Delete the Il2CppOutputProject folder in the root of the UWP build

    • Delete the ProjectName/Data folder in the root of the UWP build

    • Relaunch the build tool from Unity


Feel free to contact me or comment with any questions!


9. Resources

Unity Porting Guide. (n.d.). Retrieved from Unity Technologies: https://unity3d.com/partners/microsoft/porting-guides

About the Xbox Live Creators Program. (n.d.). Retrieved from Unity Technologies: https://unity3d.com/partners/microsoft/creators-program

Lewis, Robert. (n.d.).

System Requirements for Unity 2018.1. (n.d.). Retrieved from Unity Technologies: https://unity3d.com/unity/system-requirements

System resources for UWP apps and games on Xbox One. (2017, February 08). Retrieved from Microsoft: https://docs.microsoft.com/en-us/windows/uwp/xbox-apps/system-resource-allocation

Universal Windows Platform. (n.d.). Retrieved from Wikipedia: https://en.wikipedia.org/wiki/Universal_Windows_Platform

What's a Universal Windows Platform (UWP) app? - UWP app developer. (2018, May 07). Retrieved from Microsoft: https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide

Wijman, T. (2018, April 30). The Global Games Market 2018. Retrieved from Newzoo: https://newzoo.com/insights/articles/global-games-market-reaches-137-9-billion-in-2018-mobile-games-take-half/

XInput and DirectInput. (2018, May 31). Retrieved from Microsoft: https://docs.microsoft.com/en-us/windows/desktop/xinput/xinput-and-directinput