I followed some tutorials about using the PlayFab API in Unity and I've got some Leaderboards set up. But how can I still use the PlayFab services like Leaderboards/Player Details while still using a Unity Build based on Mirror as a Dedicated Server?
For example, this is the code to submit a Score to Leaderboard:
public void SendLeaderboard(int score) { var request = new UpdatePlayerStatisticsRequest { Statistics = new System.Collections.Generic.List<StatisticUpdate> { new StatisticUpdate { StatisticName = "SpaceCount", Value = score } } }; PlayFabClientAPI.UpdatePlayerStatistics(request, OnLeaderboardUpdate, OnError); }
But I don't like the idea of having this code on the Client Build because no one stops Me(as a Client) to modify the build to:
new StatisticUpdate { StatisticName = "SpaceCount", Value = (score*10000) }
So, basically, I need to somehow merge the dedicated server build with the PlayFab Service. Is there a guide or some steps to work out a solution? Thanks.