using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class GlobalScore : MonoBehaviour { public GameObject scoreBox; public static int currentScore; public int internalScore; void Update() { internalScore = currentScore; foreach (Text t in scoreBox.GetComponentsInChildren()) t.text = "" + internalScore; } }