Changed constants to the same Playfab Backend

dev-ali
Hazim Bin Ijaz 1 week ago
parent 4e3e49cfdf
commit 8ee8203274

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

@ -1,13 +1,14 @@
public class GameConstants
{
public static string LevelCompletedStatsKey = "LevelsCompleted";
public static string GameNamePrefix = "FlyingFred";
public static string HighScoreStatsKey = GameNamePrefix+"_HighScore";
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";
@ -17,6 +18,6 @@ public class GameConstants
//public static string Ach_CompleteAdvanceLevelKey = "Completed_Advance_Level";
//public static string Ach_WatchedAds = "Watched_Ads";
//public static string Ach_RotatedPipes = "Rotated_Pipes";
//#endregion
}

@ -7,17 +7,6 @@ using UnityEngine.SceneManagement;
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()
{
var request = new LoginWithCustomIDRequest

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

Loading…
Cancel
Save