Changed constants to the same Playfab Backend

dev-ali
Hazim Bin Ijaz 2 weeks ago
parent 4e3e49cfdf
commit 8ee8203274

@ -130,10 +130,10 @@ public class GoogleSignInManager : MonoBehaviour
private void LoginToPlayFab(string authCode) private void LoginToPlayFab(string authCode)
{ {
PlayFabSettings.staticSettings.TitleId = "1819C6"; PlayFabSettings.staticSettings.TitleId = GameConstants.PlayfabTitleId;
var request = new LoginWithGoogleAccountRequest var request = new LoginWithGoogleAccountRequest
{ {
TitleId = "1819C6", TitleId = GameConstants.PlayfabTitleId,
ServerAuthCode = authCode, ServerAuthCode = authCode,
CreateAccount = true CreateAccount = true
}; };

@ -1,13 +1,14 @@
public class GameConstants public class GameConstants
{ {
public static string GameNamePrefix = "FlyingFred";
public static string LevelCompletedStatsKey = "LevelsCompleted"; public static string HighScoreStatsKey = GameNamePrefix+"_HighScore";
public static string NameEnteredCheckKey = "IsNameEntered"; public static string NameEnteredCheckKey = "IsNameEntered";
public static string AvatarSelectedCheckKey = "AvatarSelected"; public static string AvatarSelectedCheckKey = "AvatarSelected";
public static string AvatarSelectedIndex = "AvatarSelectedIndex"; public static string AvatarSelectedIndex = "AvatarSelectedIndex";
public static string DisplayNameKey = "DisplayName"; public static string DisplayNameKey = "DisplayName";
public static string PlayfabTitleId = "168AE2";
//#region MyRegion //#region MyRegion
//public static string Ach_CompleteEasyLevelKey = "Completed_Easy_Level"; //public static string Ach_CompleteEasyLevelKey = "Completed_Easy_Level";

@ -7,17 +7,6 @@ using UnityEngine.SceneManagement;
public class PlayFabInit : MonoBehaviour public class PlayFabInit : MonoBehaviour
{ {
public string playFabTitleId = "1819C6"; // Replace with your PlayFab Title ID
void Start()
{
//if (string.IsNullOrEmpty(PlayFabSettings.TitleId))
//{
// PlayFabSettings.TitleId = playFabTitleId;
//}
//Login();
}
void Login() void Login()
{ {
var request = new LoginWithCustomIDRequest var request = new LoginWithCustomIDRequest

@ -15,7 +15,7 @@ public class PlayFabLeaderboards : MonoBehaviour
{ {
new StatisticUpdate new StatisticUpdate
{ {
StatisticName = "HighScore", StatisticName = GameConstants.HighScoreStatsKey,
Value = levelsCompleted Value = levelsCompleted
} }
} }

Loading…
Cancel
Save