Search Unity

Want to develop for XBox ? Read this. (tldr : don't do it)

Discussion in 'Getting Started' started by ker2x, May 30, 2020.

  1. ker2x

    ker2x

    Joined:
    Apr 16, 2017
    Posts:
    7
    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 :
    1. The XBox Live Creator Program : https://www.xbox.com/en-US/developers/creators-program
    2. 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...
    1. Create a windows creator account
    2. download https://github.com/microsoft/xbox-live-unity-plugin
    3. Develop a UWP app
    4. profit ?
    5. 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 https://partner.microsoft.com/en-us/xboxconfig/TestAccounts/Creator 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 : https://docs.unity3d.com/2017.3/Documentation/ScriptReference/PlayerSettings.XboxOne.html

    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, https://docs.microsoft.com/en-us/uwp/extension-sdks/uwp-limitations-on-xbox

    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.
     
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,203
    Getting everything working took a few hours on my end with most of the time spent searching through the screenshots that were in the documentation because it turns out while the text was out of date the actual screenshots had been updated at some point. I definitely didn't have to do most of the steps you listed.

    I followed the steps for setting up Windows 10 and the Xbox itself from this link.

    https://docs.microsoft.com/en-us/windows/uwp/xbox-apps/getting-started

    I followed the steps for setting up Visual Studio from this link.

    https://docs.microsoft.com/en-us/windows/uwp/xbox-apps/development-environment-setup

    I followed the steps for setting up a Unity project with this link.

    https://docs.microsoft.com/en-us/windows/uwp/xbox-apps/development-lanes-unity
     
    qball13z likes this.
  3. ker2x

    ker2x

    Joined:
    Apr 16, 2017
    Posts:
    7
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,203
    Last edited: May 31, 2020
  5. ker2x

    ker2x

    Joined:
    Apr 16, 2017
    Posts:
    7
  6. AndyRiley

    AndyRiley

    Joined:
    Aug 14, 2020
    Posts:
    1

    Very good explanation. Thanks for your article
     
  7. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    In general, developing for closed systems is a lot more of a pain than making a good ol' PC/web game. I feel like the title could more accurately be "Don't start off thinking you'll develop for consoles." At least Microsoft has the option to build UWP games and use your consumer Xbox One as a dev kit for it, but I agree that the limitations and hoops probably won't be worth it to most.

    The thing I strongly feel is that why wouldn't you want to use Unity's greatest strength: its ability to easily build for multiple platforms. Start off making a PC game, but support whatever controllers (and specs) of the console(s) you want to end up on. Make a great game. When you've got something great to show off, pitch it to one of the platform holders. If you bag an exclusivity contract, cool! Otherwise, just release it on PC and keep trying to push it onto other platforms as well.

    If you want to play in Carnegie Hall, you don't just stand outside the doors with your cello waiting to be let in. You practice and perform the best you can and work your way up there!
     
  8. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076
    Good point.