Guys i Need Guidance with high score C#
,so below i have given my codes ,what i am trying to achieve here is to save my score and display it on some other scene ,this score should be saved even when if i close the program and user should be able to share it on social media ,and the other issue is that i don't know how the score keep getting multiplied but somehow it just does get multiplied that just frustrating ,my method of doing it have not worked, could someone guide to the right tutorial or tell me basic idea of it .
1. public class callscore : MonoBehaviour {
2.
3. private GameObject score;
4. private score scorescript;
5.
6.
7. // Use this for initialization
8. void Start () {
9. score = GameObject.FindGameObjectWithTag("mainscore");
10. scorescript = score.GetComponent<score>();
11.
12. }
13.
14. // Update is called once per frame
15. void Update () {
16.
17. }
18. void OnTriggerEnter2D(Collider2D other)
19. {
20. if (other.gameObject.tag == "bis")
21. {
22. scorescript.scoreValue = scorescript.scoreValue +1;
23.
24. Destroy(other.gameObject, 2.0f);
25. }
26. }
27. }
Answer by Commoble · Mar 04, 2017 at 07:49 PM
This is a good tutorial on saving data permanently and loading it.
https://www.youtube.com/watch?v=J6FfcJpbPXE
Sharing it to social media is a whole 'nother can of worms.
Your answer
Follow this Question
Related Questions
Unity5/C# beginner here! Need some scripting help :) <3 1 Answer
Adding a Highscore to game 1 Answer
How to check if player is rapidly rotating the joystick? 2 Answers
how to implement online leader board to my project? 0 Answers
I can't make transition from actual animation to previous one 1 Answer