using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class ReplayScreen : MonoBehaviour { [SerializeField] TextMeshProUGUI finalScoreText; GameSession gameSession; void Awake() { } void Start() { gameSession = FindObjectOfType(); } public void ShowFinalScore() { gameSession = FindObjectOfType(); print(gameSession.scoreText.text); finalScoreText.text = "You were captured.\n Your score was " + gameSession.scoreText.text; } }