Unity - Firebase realtime database - Get my rank in leaderboard
问题 I have a mini-game with a leaderboard using firebase database realtime. After I got list of user-score from firebase, I would like to get the score of the current user who was out of the list. It's easy to get the score of the current user but how to know the rank in list which was OrderByChild("score"). This is the code to get the leaderboard. List<UserScore> leaderBoard = new List<UserScore>(); FirebaseDatabase.DefaultInstance .GetReference("user-scores") .OrderByChild("score") .LimitToLast