[Solved] Xbox live unity plugin, cannot build

So I want to use the XboxLive features with unity. The only way I found is using this plugin : https://github.com/Microsoft/xbox-live-unity-plugin (look like an official one).

If I start an empty project : no problem during build (for windows 10 universal app, XAML, .NET, using unity 5.6.1f1 with windows SDK and visual studio tools for UWP installed).
If I add the plugin I try to build I got this :

[quote]
Reference rewriter: Error: method System.Boolean Windows.System.UserPicker::IsSupported() doesn't exist in target framework. It is referenced from Microsoft.Xbox.Services.UWP.CSharp.dll at System.Boolean Microsoft.Xbox.Services.System.UserImpl::get_IsMultiUserApplication().
[/quote]

Looks like the dll used in this plugin use something that is not in the .NET framework.
That's really ironic that the only plugin that does not work in .Net is the official XboxLive services one.

Does anyone succeded to use XboxLive plugin and build?

That API is not part of .NET framework. It's a native windows API. In fact, it got added in Windows 10 Anniversary Update:

https://docs.microsoft.com/en-us/windows/uwp/whats-new/windows-10-version-1607-api-diff

Which Windows 10 SDK are you using to build the game from Unity? Windows 10 Anniversary Update corresponds to SDK version 14393. Anything lower will show that error, as the plugin is calling this API but it does not exist in the SDK.

I use SDK 1.0.10586.0 because if I use the last one (1.15063.0) I get this error (with or without plugin) and cannot build:

[quote]
XamlCompiler error WMC1006: Cannot resolve Assembly or Windows Metadata file 'Windows.Foundation.UniversalApiContract.winmd'

Xaml Internal Error error WMC9999: Type universe cannot resolve assembly: Windows.Foundation.UniversalApiContract, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime
[/quote]

So old SDK : no plugin, new SDK : no Build. :(

(I also opened a thread for this problem here : https://forum.unity3d.com/threads/resolved-uwp-10-cannot-build-empty-project.477785/ , but I thought at this time that using a old SDK would not be a problem so I marked it as resolved)

So I tried with 1.0.14393.0 and it build but does not run.
It builds but when running (with an empty project) , you can see on windows taskbar this is running for 1 second then immediately closed. No error in unity. I can't find any log in the build directory... Or even a way to launch it without re-building.

So here is the problem :
- You can't build with the last SDK (1.15063.0)
- If you take a SDK older than 1.0.14393.0 you can't use xbox services, but it build and run (if no plugin)
- Using 1.0.14393.0 SDK , it builds but does not run.

So finally I found a solution. You have to download 10.01.14393.033 and not 10.0.14393.795. Then it works.

In conclusion : the only sdk that work if you want to use xbox live services is 10.01.14393.033. The more recent ones make build/run impossible, and you can't use older sdk if you want the plugin to work.

Do you now when builds will be available in Unity with latest windows SDK?

Have you tried the beta?

We had some issues with it in the past, but they’ve been fixed as of 5.5.1p4 and 5.6.0. I’ll reply to the other thread to troubleshoot the issue.

I've been having similar problems though in my case it seems to alternate between a Request Error and a System Execrption error. I'm using 5.6 with Playmaker but it doesn't' seem to be able to find the Plugin. Am I missing something in my settings?

Way to little info to know what’s wrong. Please create a new thread with exact errors, etc.

There needs to be some proper Updated tutorials on Xbox Live in unity step by step I'm having so many issues building

1 Like