private PlayFab.GroupsModels.EntityKey ConvertEntityKey(PlayFab.ClientModels.EntityKey entityKey) { return(new PlayFab.GroupsModels.EntityKey() { Id = entityKey.Id, Type = entityKey.Type }); }
private void OnPlayerLogin(LoginResult loginResult) { this.entityKey = null; this.lastTokenResponse = loginResult.EntityToken; if (!IsImpersonating) { PlayerName = "Player" + "#" + loginResult.EntityToken.Entity.Id.Substring(0, 4); this.PlayerName = GameServiceManager.GameService.PlayerName; } if (GameServiceManager.GameService.IsSignedIn) { #if UNITY_IOS PlayFabClientAPI.LinkIOSDeviceID(new LinkIOSDeviceIDRequest() { DeviceId = SystemInfo.deviceUniqueIdentifier, ForceLink = false }, (LinkIOSDeviceIDResult r) => { }, (PlayFabError e) => { }); #endif #if UNITY_ANDROID PlayFabClientAPI.LinkAndroidDeviceID(new LinkAndroidDeviceIDRequest() { AndroidDeviceId = SystemInfo.deviceUniqueIdentifier, ForceLink = false }, (LinkAndroidDeviceIDResult r) => { }, (PlayFabError e) => { }); #endif } if (PlayerName == string.Empty) { } this.GroupManager = new PlayFabGroupManager(); if (!IsImpersonating && PlayerName != string.Empty) { PlayFabClientAPI.UpdateUserTitleDisplayName(new UpdateUserTitleDisplayNameRequest() { DisplayName = this.PlayerName }, new Action <UpdateUserTitleDisplayNameResult>(OnUpdaterUserDisplayName), new Action <PlayFabError>(OnUpdaterUserDisplayNameError)); } }