The player's scores are stored in a SQL database. Access to the database is facilitated through the PHP scripts provided by the web server project that was set up in the previous recipe.
In our example, all the PHP scripts were placed in a web server folder for a local web server. So, the scripts are accessed via http://localhost:8000/. However, since the URL is a public string variable, this can be set to the location of your server and site code before running the scene.
There are buttons in the Unity Scene (corresponding to the actions the web leaderboard understands) that set up the corresponding action and the parameters to be added to the URL, for the next call to the web server, via the LoadWWW() method. The OnClick() actions have been set up for each button to call the corresponding methods of the WebLeaderBoard C# script of Main Camera.
There are also several UI Text objects. One displays the most recent URL string sent to the server. Another displays the...