31/08/2023 update for Xbox Series X / S
Just saw this guide on how to enable dev mode on a Xbox Series X / S
https://www.howtogeek.com/703443/how-to-put-your-xbox-series-x-or-s-into-developer-mode/
And this YouTube video :
https://www.youtube.com/watch?v=E1zYnLbfqjU
Credits go to the guide writer and the video maker.
And docs from Microsoft
https://learn.microsoft.com/en-us/windows/uwp/xbox-apps/devkit-activation
https://learn.microsoft.com/en-us/windows/uwp/xbox-apps/getting-started
https://learn.microsoft.com/en-us/windows/uwp/xbox-apps/development-environment-setup
I have tested this on my Xbox Series X note that both the Xbox and your PC must be on the same Wifi network.
Open your project in Unity
Go to Edit -> Project Settings -> Player under Publishing Settings and check the Xbox check box.
Then go to File -> Build Settings select the following settings :
Hit build and save it to your folder.
In the created folder open YourProjectName.sin in Visual Studio.
At the top panel in VS change from Debug to Release from ARM (or whatever is listed there) change to X64 and on the Run select Remote Machine.
After that in the Solution Explorer right click on YourProjectName(Universal Windows) and under Debugging select in the drop down menu Remote Machine Change from Debug to Release and Architecture to X64.
Under Machine name enter the name of your Xbox.
Press the run button if this is your first time running on your Xbox VS might ask you for a PIN code on the Xbox Home there is a button "show pin code" press and enter the displayed code.
Play your gamer on the Xbox Console.
Enjoy.
Older answers
After some research here is a way to run a Unity built app on a retail XboxOne Developer enabled console.
Before you need a MSDN developer account A machine running Windows 10 and a XboxOne retail console.
From Unity click File -> Build settings.
Switch the platform to Windows Store (be sure to hit Switch platform for the change to take effect).
Change the SDK to universal 10 and UWP build type to D3D or XAML.
Create a new folder on your desktop (YourAppFolder)
Select Build and save the project to your newly created folder.
Open the VS project configure the build settings to run the project on your XboxOne dev console (instructions can be found in this link)
https://msdn.microsoft.com/en-us/windows/uwp/xbox-apps/getting-started
Basically thats it enjoy your newly created project running on your XboxOne.
Of course to publish games on the Xbox One platform you need to apply to ID@XBOX program more info on the topic can be found on their website.
More helpful information can be found on the links provided:
https://developer.microsoft.com/en-us/windows/holographic/exporting_and_building_a_unity_visual_studio_solution
10/10/2016 update.
Hey MS has added a great documentation on this matter look into this link :
https://msdn.microsoft.com/en-us/windows/uwp/xbox-apps/development-lanes-unity
And a video version of this :
https://www.youtube.com/watch?v=f0Ptvw7k-CE
09/03/2017 update.
From the Ms website another great resource.
https://blogs.windows.com/buildingapps/2016/04/18/intro-to-porting-unity-3d-games-to-uwp-building-and-deploying/#2dx9hHw4uQZmsDGc.97
10/05/2017 update.
After importing a Unity plugin and trying to build to UWP i encountered Unity compiler errors after help from the plugin publisher and some digging if you experience the same issues you can do the following :
On the build menu after selecting the Windows 10 platform etc press on the menu "Player settings" there under the Configuration tab you can change the .NET backend to ILCPP this should (and i repeat should) solve the compiler errors.
After opening the project on VS you will not have the same configuration for the remote machine to configure 1st set to remote machine then select Project -> Properties -> Debugging and in there you configure your remote machine settings your XboxOne should be on the same network.
02/08/2019 update.
Found this great video on YouTube (credits go to the uploader Filmstorm) on how to deploy to the Xbox One from Unity.
https://www.youtube.com/watch?v=uibEl3SmI1k
Unity 2019 update (12/08/2019).
Even though the process has not changed much here are the steps to run a Unity game from VS 2017 directly to your XboxOne console.
Assuming you have the developer licence and enabled your XboxOne dev app.
Under file select Build settings then switch the platform to Universal windows platform.
After that make sure the Architecture is set to x64 and Build type is D3D and Build configuration is Release.
After that head on to Player settings under Player -> certificate create a new certificate and save it somewhere you can then fetch it.
Click build and save to a folder of your choice.
After the build is completed open the .sin project change on the VS tool bar from Debug to Release, x64 and target to remote machine.
Under yourprojectName(universal windows) open Package.appxmanifest -> Packaging -> Publisher select the certificate you have created and close the tab.
Right click on yourprojectName(universal windows) -> Properties -> Debugging select remote machine under machine name type your XboxOne name (can be found on the xbox dev home) apply and close.
Press the play button on VS (the run process may take a few minutes) and your Unity built game should be running on your dev enabled XboxOne console.
09/12/2022 update
Just saw this guide on how to enable dev mode on a Xbox Series X / S
https://www.howtogeek.com/703443/how-to-put-your-xbox-series-x-or-s-into-developer-mode/
And this YouTube video :
https://www.youtube.com/watch?v=E1zYnLbfqjU
Credits go to the guide writer and the video maker.
And docs from Microsoft
https://learn.microsoft.com/en-us/windows/uwp/xbox-apps/devkit-activation
Enjoy.