I have my player score located in the gameobject _GM (script = gamemaster.js) like this:
static var currentScore : int = 0;
Now I want this score to be used here: (In the script gameOver.cs located in an other scene)
public void SetScore() {
var scoreData = new Dictionary<string,string> ();
scoreData ["score"] = THIS SHOULD BE THE CURRENTSCORE;
FB.API ("/me/scores", Facebook.HttpMethod.POST, delegate (FBResult result) {
Debug.Log ("Score submit result: " + result.Text);
}, scoreData);
}
So my game can post that data to Facebook.
What is the best way to do this?