I only want to use LoginWithIOSDeviceID and LoginWithAndroidDeviceID to log in the player to an existing recoverable account. I don't want to create a new anonymous account when I use LoginWithIOSDeviceID/LoginWithAndroidDeviceID.
If LoginWithDeviceID won't work because the player's device is not linked to a recoverable account, then I want to display text boxes so that the player can enter his username and password and I would use LoginWithPlayFab + LinkIOSDeviceID/LinkAndroidDeviceID to log in the player to his existing account. If the player has no account, then he needs to create a new recoverable account.
How can I use LoginWithDeviceID and LoginWithPlayFab together so that they don't always create a new anonymous account if it is not possible to log in to a recoverable account?
Where can I call LoginPlayFabAccount() in RegisterGuestPlayFabAccount() if I can not automatically log in with LoginWithDeviceID to a recoverable account?
private void RegisterGuestPlayFabAccount() { PlayerDeviceId = ReturnMobileID(); var requestIOS = new LoginWithIOSDeviceIDRequest { DeviceId = PlayerDeviceId, CreateAccount = false }; var loginTask = PlayFabClientAPI.LoginWithIOSDeviceIDAsync(requestIOS); loginTask.ContinueWith(OnPlayFabRegisterGuestAccountComplete); } private void OnPlayFabRegisterGuestAccountComplete(Task<PlayFabResult<LoginResult>> task) { if (task.Result.Result != null) { } } private void LoginPlayFabAccount() { PlayerDeviceId = ReturnMobileID(); var request = new LoginWithPlayFabRequest { TitleId = "BFD0A", Username = KeyboardTextUsername, Password = KeyboardTextPassword }; var loginTask = PlayFabClientAPI.LoginWithPlayFabAsync(request); loginTask.ContinueWith(OnPlayFabLoginAccountComplete); } private void OnPlayFabLoginAccountComplete(Task<PlayFabResult<LoginResult>> task) { if (task.Result.Result != null) { } }