So here it my experience, it’s a serious mess and to the best of my understanding.
If there is a unity dev/evangelist willing to tell me i’m doing it wrong, please do, i will listen with an open mind and good faith.
TL;DR : the XBox is not really supported (unless you have a devkit with a partner studio account). No documentation and the plugin is unusable. you can’t develop for the xbox, it just happen to “work” (somehow) through the magic of Universal Windows Plateform.
So you need an Xbox developer account. There is 2 type of account :
- The XBox Live Creator Program : Xbox Official Site: Consoles, Games and Community | Xbox
- The ID@Xbox Program : https://www.xbox.com/developers/id
As a general public / indy / hobbyist, you only have access to the Creator Program. (for a small fee, around $14).
As for the ID@Xbox, it’s the studio account with NDA, a development console, serious money, etc
Remember the good old XNA indy program microsoft had a while back that was pretty much abandoned immediatly after release ? Yup ? It’s now the Creator Program and not really getting any better.
With the Creator program you do not really have access to the Xbox. So if you think you can startup your unity and click the magic “Xbox” plateform, forget it, nope.
What you do is a “Universal Windows Plateform” and the XBox happen to be able to run it. That’s it really.
There are some serious limitation in publishing too. No multiplayer, no access to the “main” Windows Store,and so on.
So how do you do it anyway ? Well…
- Create a windows creator account
- download GitHub - microsoft/xbox-live-unity-plugin: The Xbox Live Unity Plugin provides a way for developers in the Xbox Live Creators Program to quickly and easily integrate Xbox Live functionality into their Unity based game. For ID@Xbox developers, this Xbox Live Unity Plugin does not yet support all the features you will need. Instead, contact your Microsoft representative.
- Develop a UWP app
- profit ?
- Rant about your terrible experience on the forum
Here is my “log” about how managed to wake it works. I’m still not sure why it suddenly worked somehow.
tested with Unity 2019.3.15
- Create a new default 3D project
- download xbox live unity project from github
- import “XboxLive.unitypackage” as a custom package
- 1st error : “PrecompiledAssemblyException: Multiple precompiled assemblies with the same name Newtonsoft.Json.dll included or the current platform. Only one assembly with the same name is allowed per platform.”
- Go to “XBox Live/Libs/UnityEditor/Net35”, select all DLL, uncheck all, apply
- Go to NET46, select all, check Editor, apply.
Run the application in editor :
- Assets\Xbox Live\Scripts\Leaderboard.cs(5,31): error CS0234: The type or namespace name ‘Leaderboard’ does not exist in the namespace ‘Microsoft.Xbox.Services’ and so on.
- I open Leaderboard.cs, it tell me that the associated .sln does not exist.
Xbox plugin :
- there is no XBox menu window
- in the unity explorer, i go to tool and run the associationwizard.exe
- click next
- choose my creator account
- Unable to connect to xbox live dev center right now. Please try again.
Continuing anyway :
-
going to build setting
-
choose UWP
-
click switch plateform
-
build
-
PrecompiledAssemblyException: Multiple precompiled assemblies with the same name Newtonsoft.Json.dll included or the current platform. Only one assembly with the same name is allowed per platform. Assembly paths: Assets/Xbox Live/Libs/UnityEditor/NET46/Newtonsoft.Json.dll Assets/Xbox Live/Tools/AssociationWizard/Newtonsoft.Json.dll
-
- multiple assertion error
-
go to tools/AssociationWizard, select json dll, uncheck all, apply
-
caliburn.micro.plateform.dll error
-
System.windows.interactivity error
-
select both dll, uncheck all. apply
-
build, default option
-
it build
-
it open an xbox live window
-
run box live association wizard
-
unable to connect to xbox live dev center right now. please try again later
-
check development build
-
build, create a new directory, build
-
run box live association wizard : same problem
-
click open configuration : no application associated
-
click switch to developer mode, autorize admin right
-
Command 'reg add HKLM\Software\Microsoft\XboxLive /f /v Sandbox /d ’ failed. Exit code: 1
-
Command ‘net stop XblAuthManager && net start XblAuthManager’ failed. Exit code: 2
-
dev mode not enabled
-
open cmd.exe in admin mode manually and run the first command : syntax error
-
try with powershell, same
-
according to manual /d need an argument
-
switch build to remote mode, enter ip & password of the xbox
-
Unable to find a valid Xbox Live configuration file so Xbox Live will not be enabled on UWP project.
Open “Xbox Live > Configuration” and click “Run Xbox Live Association Wizard” to configure for Xbox Live access.
-in the xbox live i have a message that tell me that my machine must be in dev mode. but the button doesn’t work. (see above)
-stuck -
switch back to local mode
-
by the way the xbox live window tell me that my configuration is invalid, no name, no publish, no scid, etc… but the wizard can’t connect. so … what now ?
-
Unable to find a valid Xbox Live configuration file so Xbox Live will not be enabled on UWP project.
Open “Xbox Live > Configuration” and click “Run Xbox Live Association Wizard” to configure for Xbox Live access. -
trying to run in in admin mode : no joy.
-
i can’t open and edit the file manually either because i have no app associated. i could edit it manualy i guess but : where is the file ? what’s its name ? can i get one from my creator account ?
i guess i’m stuck now. it look like i solved the dll hell (long time no see, huh?) but the association wizard does not work and i don’t know what to do now.
- after reading some doc i went to Sign in to your account and added my email address but “Sorry, there was an issue adding your email address.”
- You are unauthorized to view the content on this page. If you believe you should have access please contact your account administrator and request [Access required for this page]
stuck, again.
PS : when using pure visual studio app, i can run the code in remote mode on the xbox. So i believe my account and xbox is setup correctly ? I think the only remaining issue (other than the many dll problems) is that the wizard can’t connect ?
- i found a file named “XboxServices.config”, that’s probably it. i can fill some of the field but not all.
- i clicked “build and run” and the empty app ran on my xbox. except i have no idea why…
The documentation is missing. I’m not kidding, it’s not a methaphore. Look : Unity - Scripting API: XboxOne
The full documentation, in all its glory, is one sentence i’m copy/pasting here : “Xbox One Specific Player Settings.”
There is some XBox Live assembly coming with the plugin, with no documentation. And it does not give you access to the XBox SDK, it’s some stuff to interact with the XBox Live services. Ho, by the way, UWP features not supported on Xbox - Windows UWP applications | Microsoft Learn
Ho and, yeah…i bought an XBox One for this (i am strongly advising you to not do it, unless you really want to play on XBox, but then you should already have one anyway).
I could go on forever… good luck.