fix playfab leaderboard soft-lock and guest login mixup#1
Open
mooncitydev wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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