上课老师用的语句是 using UnityEngine.UI; public class texs : MonoBehaviour { public Text texts; private int score = 0; } void Update () { text.text = score.ToString (); } } 但是这句话放进5.6.2里面就会报图片上的错,text就会变红,很郁闷,去问了老师,老师也说语法没有问题,不知道是什么情
using UnityEngine.UI; public class texs : MonoBehaviour { public Text text; private int score = 0; } void Update () { text.text = score.ToString (); } } 就算是这样还是报错,并不是texts写错的问题 报错是:error CS1061: Type `Text' does not contain a definition for `text' and no extension method `text' of type `Text' could be found. Are you missing an assembly reference?