Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using TMPro;
- using UnityEngine;
- public class ScoreController : MonoBehaviour
- {
- [SerializeField] private TextMeshProUGUI scoreText;
- private float _score;
- public void UpdateScore()
- {
- _score++;
- scoreText.text = $"Score: {_score}";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment