Answer the question
In order to leave comments, you need to log in
Why is NullReferenceException thrown?
There is a program
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class NewBehaviourScript : MonoBehaviour
{
int i;
Text ruby;
void Update()
{
i++;
ruby.text = i.ToString();
}
}
ruby = new Text();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question