every time i play my game then console print thousand time this message
NullReferenceException: Object reference not set to an instance of an object
ScoreManager.Update () (at Assets/Script/ScoreManager.cs:25)
What i don now ? in below i add my script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ScoreManager : MonoBehaviour {
public static int score = 0 ;
Text scoreText;
// Use this for initialization
void Start () {
scoreText = GetComponent<Text>();
}
// Update is called once per frame
void Update ()
{
if (score < 0)
score = 0;
scoreText.text = "" + score;
}
public static void AddPoints (int pointAdd){
score += pointAdd;
}
public static void Reset ()
{
score = 0;
}
}