This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
1804 Release
Note:
We are looking forward to hearing your feedback on this new release and the new Authentication and Error Handling systems.
What's New?
-
Introducing SignInManager and PlayerAuthentication Prefab
-
We’ve heard your feedback about needing a simpler Authentication experience (both when using the out-of-the-box prefabs or writing your own).
-
PlayerAuthentication
- This prefab replaces the
UserProfile
andXboxLiveUser
prefabs in the previous releases. - Unlike
UserProfile
, whether you’re working with single or multiple user scenarios, all you need is to drag in the prefab to the scene and assign a player number to the Xbox Live User handled by this instance. - Do you need to get the signed in Xbox Live User in the other prefabs? All you need to do is make a call to
SignInManager
using the player number you assigned to the Xbox LiveUser inPlayerAuthentication
. PlayerAuthentication
and other prefabs are a good example of how to useSignInManager
.- By default, all prefabs use ‘1’ for the player number.
- This prefab replaces the
-
SignInManager handles the authentication of Xbox Live Users and allows other scripts and classes to listen to changes in the status of Xbox Live Users:
SignInPlayer (int playerNumber)
: Adds and signs in a new Xbox Live User and assigns it a player number.SignOutPlayer (int playerNumber)
: Removes and signs out the Xbox Live User with the assigned player number.SwitchUser(int playerNumber)
: Signs out the Xbox Live User with the assigned player number and adds and signs in a new Xbox Live User.GetPlayer(int playerNumber)
: Returns the Xbox Live User with the assigned player number if they exist.GetPlayer(string xuid)
: Returns the Xbox Live User with the assigned xuid if they exist.OnPlayerSignIn(int playerNumber, UnityAction<XboxLiveUser, XboxLiveAuthStatus, string> callback)
: Adds a callback method for when the Xbox Live User with player number signs in.OnPlayerSignOut(int playerNumber, UnityAction<XboxLiveUser, XboxLiveAuthStatus, string> callback)
: Adds a callback method for when the Xbox Live User with player number signs out.OnAnyPlayerSignIn(UnityAction<XboxLiveUser, XboxLiveAuthStatus, string> callback)
: Adds a callback method for when any Xbox Live User is signed inOnAnyPlayerSignOut(UnityAction<XboxLiveUser, XboxLiveAuthStatus, string> callback)
: Adds a callback method for when any Xbox Live User signs out.RemoveCallbackFromPlayer(int playerNumber, UnityAction<XboxLiveUser, XboxLiveAuthStatus, string> callback)
: Removes a callback from sign in and sign out if it exists.RemoveCallbackFromAllPlayers(UnityAction<XboxLiveUser, XboxLiveAuthStatus, string> callback)
: Removes a callback from sign in and sign out if it exists.GetCurrentPlayers()
: Returns a list of the currently signed in Xbox Live Users and their assigned player numbers.GetCurrentNumberOfPlayers()
: Returns the number of signed in Xbox Live Users.GetMaximumNumberOfPlayers()
: Returns the maximum number of signed in Xbox Live Users supported on current platform.GetPlayerNumber(string xuid)
: Returns the player number assigned to the Xbox Live User with input xuid.GetXboxLiveContextForPlayer(int playerNumber)
: Returns the Xbox Live Context for the Xbox Live User with the assigned player number.
-
-
Introducing ExceptionManager
ExceptionManager
is used by the Xbox Live User Plugin prefabs and scripts to announce and propagate exceptions occurring to listening scripts. When an exception occurs, the manager will notify listening scripts of theSourceComponent
(GameSaveManager, SignInManager, etc),ExceptionType
(SignInFailed, SignInSilentlyFailed, MinimumPlayerNumberReached, etc) and theException
so your scripts can react as needed.- For an example of how
ExceptionManager
can be used, please checkXboxLiveServicesSettings
prefab.OnException(ExceptionSource sourceComponent, UnityAction<XboxLiveException> callback)
: Adds a callback method for when the chosen sourceComponent throws an exception.OnAnyException(UnityAction<XboxLiveException> callback)
: Adds a callback method for when any Xbox Live script/prefab throws an exception.RemoveCallbackFromComponent(ExceptionSource sourceComponent, UnityAction<XboxLiveException> callback)
: Removes a callback for when the chosen sourceComponent throws an exception.RemoveCallbackFromAllComponents(UnityAction<XboxLiveException> callback)
: Removes a callback for when any Xbox Live script/prefab throws an exception.
-
An Updated Leaderboard Prefab featuring a new mode, Nearest Me, for showing leaderboard entries closest to the Xbox Live User playing.
-
Introducing Light and Dark Themes
- In this release, you can choose Dark and Light themes for each of
PlayerAuthentication
andLeaderboard
. Stay tuned for the other prefabs.
- In this release, you can choose Dark and Light themes for each of
Breaking Changes
UserProfile
andXboxLiveUser
prefabs were replaced withPlayerAuthentication
andSignInManager
.- For your exported UWP game to work on Xbox, it is now a requirement to add
<uap:SupportedUsers>multiple</uap:SupportedUsers>
add Under the<Properties></Properties>
section of the generatedpackage.appxmanifest.xml
for both single and multi-user scenarios.
Known Issues
XboxLiveSettings
class has been renamed toXboxLiveContextSettings
and is temporarily non functional.