how to implement online leader board to my project?
hi every one as im a new guy in unity so have a few problems implementing this project:https://www.youtube.com/watch?v=UvKLmQ6VAtg to my project i have a 2d endless runner game that has a distance based score and highscore system it will show the score and the highest one on gui text heres my code: GUIText guitexty; //Text text; public GameObject player; float beginPos; float curPos;
public int multiplier = 10;
// Use this for initialization
void Start()
{
beginPos = player.transform.position.y;
guitexty = GetComponent<GUIText>();
//text = GetComponent<Text>();
}
// Update is called once per frame
void Update()
{
curPos = player.transform.position.y - beginPos;
int distance = Mathf.Abs(Mathf.RoundToInt(curPos * multiplier));
if (distance > PlayerPrefs.GetInt("Best"))
PlayerPrefs.SetInt("Best", distance);
//text = "Distance: " + distance + "m /" + PlayerPrefs.GetInt("Best") + "m";
guitexty.text = "Distance: " + distance + "m /" + PlayerPrefs.GetInt("Best") + "m";
}
}
the goal is to imlement my own code to the project i given above and show the 100 highest ones on a online leader board both projects running perfectly but i want these 2 to become one project any help will be greatly appereciated!
Your answer
Follow this Question
Related Questions
error CS0201? 1 Answer
Displaying Local High Scores. 0 Answers
online highscore unity 5.1 1 Answer
Guys i Need Guidance with high score C# 1 Answer
Google Play Services leaderboard not updating after high score is beaten? 1 Answer