Add Windows.System.UserPicker

I would like to use the user picker class to allow for multiple accounts to sign in when I’m running my game on Xbox.

At the moment when I try and use the class visual studio is unable to find the reference.

I have created a blank UWP app and found that this class came in with the Anniversary update SDK (Build 14393)

My game is targeting a older version of the sdk when I export from unity - but I have changed this now to be the 14393 option.

But this still doesn’t allow visual studio to resolve the userpicker class.

Is there a setting some where which controls which version of the windows SDK unity is using while developing?

Do the Scripting run time and Api Compatibility Level options in the player settings have any bearing on this also?

Thanks
Matt

The option is in the build window (it defaults to Latest Installed).

Keep in mind that the class is only available in the player (and not the editor), so you have to wrap it in “#if ENABLE_WINMD_SUPPORT” macro. Also, if you’re using IL2CPP, you have to use either .NET 4.x or .NET Standard 2.0 API compatibility level.