This is my script that is assigned to Text (Legacy):
using UnityEngine;
using System;
using UnityEngine.UI;
public class Text : MonoBehaviour
{
public long score;
Text output;
void Start()
{
output = GetComponent();
output.text = "Score: " + score;
}
}
The UI should then display “Score: score”. I am using the Unity 2021.3.22f1 Personal version. I am a beginner. The error of this script is error CS1061(it is market red).
Thanks in advance for any help.