I am using Firebase for Unity to retrieve top 100 scores using:
FirebaseDatabase.DefaultInstance.GetReference("users").OrderByChild("stat/score").LimitToFirst(100).GetValueAsync()
Everything is fine, however, if a user is not in the TOP 100, I still want to show the user rank, like if the user is ranked in the "1004" place, I want to retrieve that value for a specific user and view it.
I do not want to retrieve the whole user's data and retrieve user ranking on the client side since users data will increase to a large amount.
My firebase database structure is as following:
users
userID
stat
score