private void OnInfoResult(GetAccountInfoResult obj) { displayName = obj.AccountInfo.TitleInfo.DisplayName.ToString(); contactEmail = obj.AccountInfo.PrivateInfo.Email.ToString(); print("<color=#00bc04>" + displayName + "</color>"); GetPlayerData(); }
void Success(GetAccountInfoResult _result) { MyPlayfabID = _result.AccountInfo.PlayFabId; PlayFabClientAPI.GetUserData(new GetUserDataRequest() { PlayFabId = MyPlayfabID, Keys = null }, result => { Debug.Log("Got user data:"); if (result.Data == null || !result.Data.ContainsKey("PosX")) { Debug.Log("PosX"); } else { Debug.Log("PosX: " + result.Data["PosX"].Value); //transform.position.Set() //transform.rotation.SetEulerAngles() } }, (error) => { Debug.Log(error.GenerateErrorReport()); }); }
// ACCOUNT INFO private void OnGetAccountInfoSuccess(GetAccountInfoResult result) { gameObject.SetActive(true); username.text = result.AccountInfo.Username; Debug.Log("got account"); finishedLoadingCount++; }
private void AccountTaken(GetAccountInfoResult result) { notification.SetActive(true); notification.GetComponent <Notification>().UseNotification( username + " is taken.\n Please choose another.", 4.0f); loginSuccess = false; requestReturned = true; }
private void LoadAccountInfo(GetAccountInfoResult result) { Debug.Log("Fetching player in-game name..."); // Load player data based on key-value pairs from PlayFab myPlayer.username = result.AccountInfo.TitleInfo.DisplayName; PhotonNetwork.playerName = myPlayer.username; Instantiate(chatGUI, Vector3.zero, Quaternion.identity); }
/// <summary> /// Callback for GetAccountInfo Success /// </summary> /// <param name="Result"> Result - from the API Call</param> static void OnGetAccountInfoSuccess(GetAccountInfoResult result) { PlayFabLoginCalls.LoggedInUserInfo = result.AccountInfo; if (OnPlayfabCallbackSuccess != null) { OnPlayfabCallbackSuccess("", PlayFabAPIMethods.GetAccountInfo); } }
private void GetAccountSuccess(GetAccountInfoResult result) { print("Account를 정상적으로 받아옴"); //UserNickname = result.AccountInfo.Username; UserNickname = result.AccountInfo.TitleInfo.DisplayName; Debug.Log(UserNickname); roomInformation.Connect(); }
private void OnGotAccountInfo(GetAccountInfoResult result) { GetAccountInfoCommandResult getAccountInfoResult = new GetAccountInfoCommandResult { Username = result.AccountInfo.Username }; Callback?.Invoke(getAccountInfoResult); }
/// <summary> /// Callback for GetAccountInfo Success /// </summary> /// <param name="Result"> Result - from the API Call</param> static void OnGetAccountInfoSuccess(GetAccountInfoResult result) { Debug.Log(result.AccountInfo.TitleInfo.DisplayName); // Set DisplayName in PlayerPrefs PlayerPrefs.SetString("DisplayName", result.AccountInfo.TitleInfo.DisplayName); PhotonNetwork.NickName = result.AccountInfo.TitleInfo.DisplayName; }
private void GetUserData(GetAccountInfoResult result) { // Grab name PlayerPersistentData.playerName = result.AccountInfo.TitleInfo.DisplayName; PhotonNetwork.playerName = result.AccountInfo.TitleInfo.DisplayName; // Open lobby logRegisterPanel.SetActive(false); lobbyPanel.SetActive(true); }
private void AcctInfoCallback(GetAccountInfoResult result) { if (result.AccountInfo == null || result.AccountInfo.TitleInfo == null || result.AccountInfo.TitleInfo.Origination == null || !Enum.IsDefined(typeof(UserOrigination), result.AccountInfo.TitleInfo.Origination.Value)) { lastReceivedMessage = "Enums not properly tested"; return; } lastReceivedMessage = "Enums tested"; }
void OnSignInSuccess(string user, LoginResult result, Action <LoginResult> action) { var request = new UpdateUserTitleDisplayNameRequest(); request.DisplayName = user; PlayFabClientAPI.UpdateUserTitleDisplayName(request, null, null); var newResult = new GetAccountInfoResult(); action(result); }
private void AcctInfoCallback(GetAccountInfoResult result) { var enumCorrect = (result.AccountInfo != null && result.AccountInfo.TitleInfo != null && result.AccountInfo.TitleInfo.Origination != null && Enum.IsDefined(typeof(UserOrigination), result.AccountInfo.TitleInfo.Origination.Value)); var testContext = (UUnitTestContext)result.CustomData; testContext.True(enumCorrect, "Enum value does not match expected options"); testContext.EndTest(UUnitFinishState.PASSED, null); }
/* * Step 2 * We request Photon authentication token from PlayFab. * This is a crucial step, because Photon uses different authentication tokens * than PlayFab. Thus, you cannot directly use PlayFab SessionTicket and * you need to explicitely request a token. This API call requires you to * pass Photon App ID. App ID may be hardcoded, but, in this example, * We are accessing it using convenient static field on PhotonNetwork class * We pass in AuthenticateWithPhoton as a callback to be our next step, if * we have acquired token succesfully */ private void RequestPhotonToken(GetAccountInfoResult obj) { LogMessage("PlayFab authenticated. Requesting photon token..."); //We can player PlayFabId. This will come in handy during next step _playFabPlayerIdCache = obj.AccountInfo.PlayFabId; PlayFabClientAPI.GetPhotonAuthenticationToken(new GetPhotonAuthenticationTokenRequest() { PhotonApplicationId = PhotonNetwork.PhotonServerSettings.AppID }, AuthenticateWithPhoton, OnPlayFabError); }
void OnAccountSuccess(GetAccountInfoResult result) { string nickname = result.AccountInfo.TitleInfo.DisplayName; if (nickname == null) { return; } else { PlayerPrefs.SetString("NickName", nickname); } }
private void GetAccountSuccess(GetAccountInfoResult result) { print("Accout를 정상적으로 받아옴"); string nickname = result.AccountInfo.TitleInfo.DisplayName; if (nickname == null) { SceneManager.LoadScene("NicknameSet"); } else { PlayerPrefs.SetString("Nickname", nickname); SceneManager.LoadScene("Lobby"); } }
private void OnGetAccountInfoSuccess(GetAccountInfoResult resultData) { // If infopanel is disabled then enable it ,it's like toggle if (!infoPanel.activeSelf) { infoPanel.SetActive(true); } print("Account Created Date."); // Data output print(resultData.AccountInfo.Username); // Display result on text infoUsername.text = resultData.AccountInfo.Username.ToString(); infoCreatedAt.text = resultData.AccountInfo.PrivateInfo.Email.ToString(); print(resultData.AccountInfo.Created); }
private void OnUserDetailsResult(GetAccountInfoResult result) { // User Custom ID is known check if they have email created if (result.AccountInfo.PrivateInfo.Email == null) { //user needs to add email Debug.Log("User needs to create more account information"); uxPlayFab.ShowCreateAccount(); } else { // good to go! Debug.Log("User:" + result.AccountInfo.Username); localStorage.SetPrefLoggedInCustomIDandEmail(); CheckRights(); } }
private void OnGetAccountInfoSuccess(GetAccountInfoResult accountInfo) { string displayName = null; if (accountInfo.AccountInfo.TitleInfo != null) { displayName = accountInfo.AccountInfo.TitleInfo.DisplayName; } if (displayName == "" || displayName == null) { Debug.Log("Successful anonymous login."); } else { Debug.Log("Successful login account. Display name is: [" + displayName + "]"); playerInfo.PlayerName = displayName; OnPlayerNameChanged.Invoke(displayName); } }
private void onGetAccountInfoSuccess(GetAccountInfoResult obj) { userprofile.displayname = obj.AccountInfo.TitleInfo.DisplayName; }
private void OnGetAccountInfoSuccess(GetAccountInfoResult result) { _playfabUser.Instance.PlayfabId = result.AccountInfo.PlayFabId; }
public GetAccountInfoResult GetAccountInfo(String Request) { GetAccountInfoResult getAccountInfoResult = new GetAccountInfoResult(); String ReturnCode = ""; String Descriptioin = ""; StringBuilder Response = new StringBuilder(); Response.AppendFormat("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); #region XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(Request); XmlNode versionNode = xmlDoc.SelectNodes("/root/callinfo/version")[0]; String version = versionNode.Attributes["value"].Value; XmlNode SPIDNode = xmlDoc.SelectNodes("/root/callinfo/SPID")[0]; String SPID = SPIDNode.Attributes["value"].Value; XmlNode CustIDNode = xmlDoc.SelectNodes("/root/srchcond/conds/CUSTID")[0]; String CustID = CustIDNode.Attributes["value"].Value; XmlNode BesttoneAccountNode = xmlDoc.SelectNodes("/root/srchcond/conds/BesttoneAccount")[0]; String BA = BesttoneAccountNode.Attributes["value"].Value; #endregion int Result = 0; String ErrMsg = ""; StringBuilder strLog = new StringBuilder(); try { #region 条件校验 if (CommonUtility.IsEmpty(SPID)) { ReturnCode = Convert.ToString(ErrorDefinition.CIP_IError_Result_SPIDInValid_Code); Descriptioin = ErrorDefinition.CIP_IError_Result_SPIDInValid_Msg; Response.AppendFormat("<result returnCode = {0} msg = {1} />", ReturnCode, Descriptioin); //return Response.ToString(); getAccountInfoResult.ReturnCode = Convert.ToString(ErrorDefinition.CIP_IError_Result_SPIDInValid_Code); getAccountInfoResult.Msg = ErrorDefinition.CIP_IError_Result_SPIDInValid_Msg; return getAccountInfoResult; } //IP是否允许访问 Result = CommonBizRules.CheckIPLimit(SPID, HttpContext.Current.Request.UserHostAddress, this.Context, out ErrMsg); strLog.AppendFormat("请求方ip:{0}\r\n", HttpContext.Current.Request.UserHostAddress); strLog.AppendFormat("CheckIPLimit Result:{0},ErrMsg:{1}\r\n", Result, ErrMsg); if (Result != 0) { ReturnCode = Convert.ToString(ErrorDefinition.BT_IError_Result_BizIPLimit_Code); Descriptioin = ErrorDefinition.BT_IError_Result_BizIPLimit_Msg; //Response.AppendFormat("<result returnCode = {0} msg = {1} />", ReturnCode, Descriptioin); //return Response.ToString(); getAccountInfoResult.ReturnCode = Convert.ToString(ErrorDefinition.BT_IError_Result_BizIPLimit_Code); getAccountInfoResult.Msg = ErrorDefinition.BT_IError_Result_BizIPLimit_Msg; return getAccountInfoResult; } //接口访问权限判断 Result = CommonBizRules.CheckInterfaceLimit(SPID, "GetAccountInfo", this.Context, out ErrMsg); strLog.AppendFormat("CheckInterfaceLimit Result:{0},ErrMsg:{1}\r\n", Result, ErrMsg); if (Result != 0) { //return Result; ReturnCode = Convert.ToString(ErrorDefinition.BT_IError_Result_BizInterfaceLimit_Code); Descriptioin = ErrorDefinition.BT_IError_Result_BizInterfaceLimit_Msg; Response.AppendFormat("<result returnCode = {0} msg = {1} />", ReturnCode, Descriptioin); //return Response.ToString(); getAccountInfoResult.ReturnCode = ReturnCode; getAccountInfoResult.Msg = Descriptioin; return getAccountInfoResult; } if (CommonUtility.IsEmpty(CustID) && CommonUtility.IsEmpty(BA)) { ReturnCode = Convert.ToString(ErrorDefinition.BT_IError_Result_BizInterfaceLimit_Code); Descriptioin = "CustID和BesttoneAccount不能同时为空!"; Response.AppendFormat("<result returnCode = {0} msg = {1} />", ReturnCode, Descriptioin); //return Response.ToString(); getAccountInfoResult.ReturnCode = ReturnCode; getAccountInfoResult.Msg = Descriptioin; return getAccountInfoResult; } BesttoneAccount account = null; BesttoneAccountDAO dao = new BesttoneAccountDAO(); if (!CommonUtility.IsEmpty(CustID)) { account = dao.QueryByCustID(CustID); } if (!CommonUtility.IsEmpty(BA)) { account = dao.QueryByBestAccount(BA); } if (account == null) { ReturnCode = Convert.ToString(ErrorDefinition.BT_IError_Result_BizInterfaceLimit_Code); Descriptioin = "账户不存在!"; Response.AppendFormat("<result returnCode = {0} msg = {1} />", ReturnCode, Descriptioin); //return Response.ToString(); getAccountInfoResult.ReturnCode = ReturnCode; getAccountInfoResult.Msg = Descriptioin; return getAccountInfoResult; } //查询账户余额 AccountItem item; Result = BesttoneAccountHelper.QueryBesttoneAccount(account.BestPayAccount, out item, out ErrMsg); if (Result == 0) { AccountInfoData data = new AccountInfoData(); getAccountInfoResult.ReturnCode = "0"; getAccountInfoResult.Msg = "成.功"; data.Id = ""; data.CustID = account.CustID; data.BesttoneAccount = account.BestPayAccount; data.AccountType = item.AccountType; data.AccountStatus = item.AccountStatus; data.AccountBalance = item.AccountBalance; data.PredayBalance = item.PredayBalance; data.PremonthBalance = item.PreMonthBalance; data.AvailableBalance = item.AvailableBalance; data.UnavailableBalance = item.UnAvailableBalance; data.AvailableCash = item.AvailableLecash; data.CardNum = item.CardNum; data.CardType = item.CardType; getAccountInfoResult.data = data; //Response.AppendFormat("<Result returnCode = \"0\" msg = \"成功\">"); //Response.AppendFormat("<Data ID = \"\">"); //Response.AppendFormat("<CUSTID>{0}</CUSTID>", account.CustID); //Response.AppendFormat("<BESTTONEACCOUNT>{0}</BESTTONEACCOUNT>", account.BestPayAccount); //Response.AppendFormat("<ACCOUNTTYPE>{0}</ACCOUNTTYPE>", item.AccountType); //Response.AppendFormat("<ACCOUNTSTATUS>{0}</ACCOUNTSTATUS>", item.AccountStatus); //Response.AppendFormat("<ACCOUNTBALANCE>{0}</ACCOUNTBALANCE>", item.AvailableBalance); //Response.AppendFormat("<PREDAYBALANCE>{0}</PREDAYBALANCE>", item.PredayBalance); //Response.AppendFormat("<PREMONTHBALANCE>{0}</PREMONTHBALANCE>", item.PreMonthBalance); //Response.AppendFormat("<AVAILABLEBALANCE>{0}</AVAILABLEBALANCE>", item.AvailableBalance); //Response.AppendFormat("<UNAVAILABLEBALANCE>{0}</UNAVAILABLEBALANCE>", item.UnAvailableBalance); //Response.AppendFormat("<AVAILABLECASH>{0}</AVAILABLECASH>", item.AvailableLecash); //Response.AppendFormat("<CARDNUM>{0}</CARDNUM>", item.CardNum); //Response.AppendFormat("<CARDTYPE>{0}</CARDTYPE>", item.CardType); //Response.AppendFormat("</Data>"); //Response.AppendFormat("</Result>"); } else { ReturnCode = Convert.ToString(ErrorDefinition.BT_IError_Result_BizInterfaceLimit_Code); Descriptioin = "账户查询失败!"; //Response.AppendFormat("<result returnCode = {0} msg = {1} />", ReturnCode, Descriptioin); getAccountInfoResult.ReturnCode = ReturnCode; getAccountInfoResult.Msg = Descriptioin; } #endregion } catch (Exception e) { getAccountInfoResult.ReturnCode = "-9001"; getAccountInfoResult.Msg = e.ToString(); } //return Response.ToString(); return getAccountInfoResult; }
public void GetAccountInfoSuccess(GetAccountInfoResult result) { Debug.Log("Get account info successfully!"); PhotonNetwork.NickName = result.AccountInfo.Username; }
void Successs(GetAccountInfoResult result) { MyPlayfabID = result.AccountInfo.Username; Debug.Log(MyPlayfabID); }
private void GetAccountInfoSuccesss(GetAccountInfoResult result) { PhotonNetwork.NickName = result.AccountInfo.Username; SceneManager.LoadScene("Main"); }
void success(GetAccountInfoResult result) { MyPlayfabID = result.AccountInfo.PlayFabId; Debug.Log("Successfully obtain PlayFabID"); }
void Successs(GetAccountInfoResult result) { NickName = result.AccountInfo.Username; PlayerPrefs.SetString(NameKey, NickName); }
private void OnGetInfoSucceed(GetAccountInfoResult result) { username = result.AccountInfo.Username; }
private void OnAccountInfoSucess(GetAccountInfoResult accountInfo) { playfabInfo = accountInfo; ConnectToPhoton(PlayerPrefs.GetString("USERNAME")); //conect to photon with the username; }
void Successs(GetAccountInfoResult result) { playerName = result.AccountInfo.Username; }
private void OnInfoResult(GetAccountInfoResult obj) { nickname.text = obj.AccountInfo.TitleInfo.DisplayName.ToString(); print("<color=#00bc04>" + nickname.text + "</color>"); }