- Home /
GUI NullReferenceException
The minute I create a GUI skin I get:
"NullReferenceException: Object reference not set to an instance of an object UnityEngine.GUISkin.BuildStyleCache () UnityEngine.GUISkin.OnValidate () UnityEngine.ScriptableObject:.ctor() UnityEngine.ScriptableObject:.ctor() UnityEngine.GUISkin:.ctor() GUISkinEditor:CreateNewGUISkin()
I added var customSkin : GUISkin; to my script as per my understanding of the documents and selected my GUI skin in the Inspector but the error remains. Plus my custom settings don't seem to be working so I guess it's not the right script. But why does the NullReferenceError generate the second I create a GUI skin?
Answer by Graham-Dunnett · Jun 09, 2010 at 04:51 PM
This appears to be a bug in Unity. From my limited testing it appears harmless. We do have a bug report on this against 2.6.1.
Answer by Davies · Jun 10, 2010 at 06:12 AM
OK thanks. The Gui skin should still work OK then? Cheers.
Your answer
Follow this Question
Related Questions
Setting parent gives error? 2 Answers
Object reference exists but also doesn't? 1 Answer
NullreferenceException, BeginScrollView style change 3 Answers
GUI.Label not set to an instance 0 Answers
GUI Null Reference Exception? 2 Answers