I'm kinda new in C#. I used Unity and C# for the project. I got a problem while I tried to change a text labels content with pressing a button. I tried everything, I watched all the tutorials but still got that massage: " Object reference not set to an instance of an object". I attach some parts of the code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System;
using System.IO;
...
public class LaboratoryController : MonoBehaviour
{
public Text labelText;
public void ChangeText()
{
labelText.text = "Example";
}
}