Skip to content
Branch: master
Find file History
PFarqMS and markseminatore PlayFab Leaderboards Unity Sample (#26)
This sample demonstrates reading and writing from/to leaderboards from within a Unity title. The sample covers lowest score/best time, high score and cumulative score leaderboards.
Latest commit 0a01a0a Jan 18, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
Assets
ProjectSettings PlayFab Leaderboards Unity Sample (#26) Jan 18, 2019
cloudscript.js PlayFab Leaderboards Unity Sample (#26) Jan 18, 2019
readme.md PlayFab Leaderboards Unity Sample (#26) Jan 18, 2019

readme.md

PlayFab Leaderboards Unity Sample

This sample was created with Unity 2018.3

Description

This sample demonstrates reading and writing from/to leaderboards from within a Unity title. The sample covers lowest score/best time, high score and cumulative score leaderboards.

Known Issues

There are no known issues.

Building the Sample

Build Requirements

  • Unity 2018.3 or later
  • Visual Studio 2017 (15.7 update) or later

PlayFab Configuration

  • Create the 'best_time' leaderboard
    • Statistic Name: best_time
    • Reset Frequency: Manually
    • Aggregation Method: Minimum
  • Create the 'high_score' leaderboard
    • Statistic Name: high_score
    • Reset Frequency: Manually
    • Aggregation Method: Maximum
  • Create the 'total_score' leaderboard
    • Statistic Name: total_score
    • Reset Frequency: Manually
    • Aggregation Method: Sum
  • Copy the contents of 'cloudscript.js' to your cloud script

Using the Sample

Requirements

  • PlayFab title (created on PlayFab.com)
    • Title must be configured correctly (see PlayFab Configuration above)
  • Initial Setup
    • Update PlayFabSharedSettings.asset to replace the TitleID value with your title ID.

Using the Sample

  • Use the left and right arrows to switch leaderboards
  • Enter a numeric value in the Value box and press any of the post buttons to post that value as the relevant score type
  • Press Refresh to retrieve the latest leaderboard data
    • Switching leaderboards will also refresh the data.

Update History

  • January 14, 2019
    • Initial release

Privacy Statement

For more information about Microsoft’s privacy policies in general, see the Microsoft Privacy Statement.

You can’t perform that action at this time.