diff --git a/Assets/GoogleSigninSDK/GoogleSignInManager.cs b/Assets/GoogleSigninSDK/GoogleSignInManager.cs index 2952d65e..8e72fa37 100644 --- a/Assets/GoogleSigninSDK/GoogleSignInManager.cs +++ b/Assets/GoogleSigninSDK/GoogleSignInManager.cs @@ -162,10 +162,10 @@ public class GoogleSignInManager : MonoBehaviour private void LoginToPlayFab(string authCode) { - PlayFabSettings.staticSettings.TitleId = "1879F5"; + PlayFabSettings.staticSettings.TitleId = GameConstants.PlayfabTitleId; var request = new LoginWithGoogleAccountRequest { - TitleId = "1879F5", + TitleId = GameConstants.PlayfabTitleId, ServerAuthCode = authCode, CreateAccount = true }; diff --git a/Assets/Scripts/Dev/GameConstants.cs b/Assets/Scripts/Dev/GameConstants.cs index 489837dd..6f352e52 100644 --- a/Assets/Scripts/Dev/GameConstants.cs +++ b/Assets/Scripts/Dev/GameConstants.cs @@ -1,13 +1,14 @@ public class GameConstants { - - public static string LevelCompletedStatsKey = "LevelsCompleted"; + public static string GameNamePrefix = "HeroesOfLabyrinth"; + public static string LevelCompletedStatsKey = GameNamePrefix+"_LevelsCompleted"; public static string NameEnteredCheckKey = "IsNameEntered"; public static string AvatarSelectedCheckKey = "AvatarSelected"; public static string AvatarSelectedIndex = "AvatarSelectedIndex"; public static string DisplayNameKey = "DisplayName"; - + public static string PlayfabTitleId = "168AE2"; + #region MyRegion public static string Ach_CompleteEasyLevelKey = "Completed_Easy_Level"; diff --git a/Assets/Scripts/Dev/PlayFab/PlayFabInit.cs b/Assets/Scripts/Dev/PlayFab/PlayFabInit.cs index 279b53bc..aeb689a3 100644 --- a/Assets/Scripts/Dev/PlayFab/PlayFabInit.cs +++ b/Assets/Scripts/Dev/PlayFab/PlayFabInit.cs @@ -7,15 +7,6 @@ using UnityEngine.SceneManagement; public class PlayFabInit : MonoBehaviour { - public string playFabTitleId = "7D3B9"; // Replace with your PlayFab Title ID - - void Start() - { - if (string.IsNullOrEmpty(PlayFabSettings.TitleId)) - { - PlayFabSettings.TitleId = playFabTitleId; - } - } // 🚀 Called from GoogleSignInManager when Google Sign-In is successful public void LoginToPlayFabWithGoogle(string idToken)