public static UserModel CreateNewUserModel() { return(new UserModel { id = SystemInfo.deviceUniqueIdentifier, playFabAccountData = PlayFabAccountData.CreateEmpty(), }); }
// -------------------------------------------------------------------------------------------- /// <summary> /// Log in to the local player's account. /// </summary> public void LogIn(AccountAuthenticationManager.AuthenticationSuccessDelegate onSuccess, AccountAuthenticationManager.AuthenticationFailureDelegate onFailure) { _authenticationManager = new PlayFabAccountAuthenticationManager( new List <SessionProvider> { new UnityDeviceIdSessionProvider() }, SystemInfo.deviceUniqueIdentifier, AppConsts.PlayFab.TitleID); _authenticationManager.Authenticate(() => { _accountData = _authenticationManager.AccountData; AuthenticatedSuccessfully?.Invoke(this, new AuthenticatedSuccessfullyEventArgs(_accountData)); onSuccess(); }, (TofuErrorCode errorCode, string errorMessage) => { FailedToAuthenticate?.Invoke(this, EventArgs.Empty); onFailure(errorCode, errorMessage); }); }
public AppStartupControllerCompletedEventArgs(bool successful, PlayFabAccountData accountData) : base(successful) { this.accountData = accountData; }
public AuthenticatedSuccessfullyEventArgs(PlayFabAccountData accountData) { this.accountData = accountData; }