I have been more than a week with an error in my Unity project … I have already shown this error to my teacher, who after analyzing and testing the error for a few hours, my teacher simply does not know how to fix it.
Apparently it is a common mistake:
"NullReferenceException: Object reference not set to an instance of an object
UIManager.SetUseable (ActionButton btn, IUseable useable) (at C:/Users/Mystic Rabbit/Desktop/GameMaker/RPG v9.1/RPG/Assets/Scripts/Managers/UIManager.cs:112)
UIManager.Start () (at C:/Users/Mystic Rabbit/Desktop/GameMaker/RPG v9.1/RPG/Assets/Scripts/Managers/UIManager.cs:54)"
But the way it came up, makes it different from other mistakes …
Before you want to give a generic solution, wait a little, let me explain the question better…
My project is an RPG game, I’m following this tutorial … Exactly this step 9.2
After completing the tutorial without any error … I mean exactly like in the video, I made everything work, every skill, every function…
However, after restarting unity … The error began to appear … Just like this, everything was working well, I restarted the unity and the error appeared.
Below is a video of 1 minute, with the exact moment I finish the tutorial and restart Unity. Realize how everything is working, there is no error … After restarting the functions do not work and the error appears.
I’m leaving the link of the tutorial too, so you can see, that I got the same result … But unlike it, mine stops working after restarting the software.
I am also leaving the link with the other topic I created for the error, as I thought it was a simple error and that someone could help me normally, I had created another topic … But as time goes by, it seems to me be some other type of problem that even my teacher could not understand … Even reviewing my actions and my scripts step by step ![]()
NOTE: I am not leaving, the script or the complete error here, because as I created another typical whole just to speak this error, most of the information is already in it.