playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.46k stars 965 forks source link

Mixup in meaning of ILeaderboard.SetUserFilter(string[] userIDs) #2980

Open JegoMx opened 3 years ago

JegoMx commented 3 years ago

Hello, I believe the summary regarding this method is wrong.

In the ILeaderboard interface, following code can be found:

    void SetUserFilter(string[] userIDs);

With the summary describing this function as "Only search for these user IDs." However, when you look at the implentation, this does the exact opposite: it filters out these userIDs of the results instead of looking for them.

In PlayGamesLeaderboard.cs , it is used in the following way:

    public void SetUserFilter(string[] userIDs)
    {
        mFilteredUserIds = userIDs;
    }

And on line 148, AddScore(PlayGamesScore score) uses these filtered user ids to NOT include any score in the leaderboard that contains this ID.

I'm sorry if this post is badly formatted, it's my first post on github. Hope I made myself clear.