Displaying the score after a reset.

Hello. I am working on a game that is for the Android and is 2D. I am having a problem with displaying score. The script I use involves a Void Awake that is set to reset the score ( Which is what I want. ) When the game is finished it takes you to a different scene that is the menu. I want the latest score to be displayed on that menu instead of just resetting it to zero. I am using this script for the Score

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class ScoreManager : MonoBehaviour
{
	public static int score;        // The player's score.
	
	
	Text text;                      // Reference to the Text component.
	
	
	void Awake ()
	{
		// Set up the reference.
		text = GetComponent <Text> ();

		score = 0;
		
	}
	
	
	void Update ()
	{
		// Set the displayed text to be the word "Score" followed by the score value.
		text.text = "Score: " + score;
	}
}

The score is updated by each click on a gameObject in the game, if useful I will put that script on to. I have made a different post where I just removed the Awake function, but resetting the score seems impossible. The name of the UIText where the score is displayed is called ScoreText. All help is very appreciated.

At the end of the game before it switches to the menu scene, you could use

PlayerPrefs.SetInt("Score", score);

And in the menu scene when you display the score use

text.text = PlayerPrefs.GetInt("Score");

or

text.text = PlayerPrefs.GetInt("Score").ToString();

I think they both work.

Hello. I asked a question recently. I think it will work for you as well.

In the menu make the ScoreText to a public static string ScoreText; property and you can change it from other scene. So when the game ends you can change the text with ScriptName.ScoreText = score.ToString() and after Application.LoadLevel("Menu"); So it should display the latest score.