Skip to content

fix playfab leaderboard soft-lock and guest login mixup#1

Open
mooncitydev wants to merge 1 commit into
aavegotchi:mainfrom
mooncitydev:fix/playfab-leaderboard-and-guest-login
Open

fix playfab leaderboard soft-lock and guest login mixup#1
mooncitydev wants to merge 1 commit into
aavegotchi:mainfrom
mooncitydev:fix/playfab-leaderboard-and-guest-login

Conversation

@mooncitydev

Copy link
Copy Markdown

hey team, its moondev, checked the codebase by chance and fixed 3 bugs in PlayfabManager, not sure if helpful

first one is LeaderboardIsDone was returning true before extra stats actually loaded. it only checked if gems == string.Empty, but fresh tuple slots default to null, and null != string.Empty. so the game over leaderboard UI would render with blank gems and kills for everyone even though the data was still in flight from GetUserData.

second, if any PlayFab call failed during the death stats pipeline (network, not logged in, rate limit), OnError set error=true and Update() killed the coroutine, but LeaderboardIsDone kept returning false forever because otherValues stayed at length 0. game over screen just hung on an infinite wait. now pipeline errors mark the load as failed/complete so the UI can move on, and per-row GetUserData failures fall back to 0 instead of blocking.

third, LoginAsGuest was reading PlayerPrefs WalletAddress and using that as the PlayFab CustomId when present. so hitting guest after connecting a wallet (or with a stale pref) logged you into the wallet account anyway. guest now always uses the uniqueID pref like it was probably meant to.

cheers

leaderboard was marking itself done before gems/kills loaded, and any playfab error during the death flow could freeze game over forever. guest login was also reusing a saved wallet address as the playfab id.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant