- Home /
Error message on console & Unity crashing
I've been following a Unity Tutorial for creating a shop UI (https://www.youtube.com/watch?v=TAJCr3_kfEc) but keep running into some issues. The tutorial was going well until part 7/9 when I kept getting an error message on console saying ' UnassignedReferenceException: The variable prefab of SimpleObjectPool has not been assigned'. Either this happens, or Unity crashes when I try to execute the program. I have copy pasted the code from https://unity3d.com/learn/tutorials/topics/user-interface-ui/intro-and-setup so I do not understand what I am doing wrong. It was working fine prior to this step. Thank you!
chiker is right. Look for the SimpleObjectPool variable. If it's public or has the [SerializeField] attribute infront of it, it should show up in the inspector and mustn't have no reference, drag the right one in.
If neither are the case look for where the variable is set by code and check why the assignment fails (Gameobject.Find cannot find a reference because its missing, FInd string is mispelled, Gameobject is inactive at that time... etc.)
Your answer
Follow this Question
Related Questions
Unity Editor has stopped working" in Windows 8 0 Answers
Does anyone know what "Invalid Cached Offset Error" is? 0 Answers
How do I fix this Compiler Error? 1 Answer
Input Button is not setup Error 1 Answer
Console Discrepancy Detector is False 0 Answers