/// <summary> /// Not implemented yet. /// </summary> public static void UnlinkCustomId(PlayFab.SharedModels.PlayFabResultCommon result = null) { if (string.IsNullOrEmpty(linkSecretKey)) { return; } string user = userId; if (instance.loginResult != null) { user = instance.loginResult.PlayFabId; } UnlinkCustomIDRequest unlinkRequest = new UnlinkCustomIDRequest() { CustomId = user + linkSecretKey }; PlayFabClientAPI.UnlinkCustomID(unlinkRequest, (unlinkResult) => { Debug.Log("Last: Unlinked Id, logging in with new eventually..."); if (result != null) { OnLoggedIn(instance.loginResult); } }, (unlinkError) => { if (unlinkError.Error != PlayFabErrorCode.CustomIdNotLinked) { OnLinkError(unlinkError); } }); }
private static void OnLinkSuccess(PlayFab.SharedModels.PlayFabResultCommon result) { if (linkSucceededEvent != null) { if (result is LinkCustomIDResult) { linkSucceededEvent(linkSecretKey); } else { linkSucceededEvent(null); } } /* * //in UI * string key = ""; * for (int i = 0; i < (linkSecretKey.Length / 4) - 1; i++) * { * key = linkSecretKey.Substring(i * 4, 4) + " - "; * } */ Debug.Log("Custom Link Now Active for 3 Minutes!"); }