Why am i getting this? NullReferenceException because of UnityEditor.GridPaintingState.UnregisterPainterInterest
So i am working on a little game project and was using unity 2017.2 when the new version 2017.3 was out i just had to get it. That all purpose tool is gold.
There is only one problem though. I'm getting this error in my projects. Even when i start a new project the error is there. I have looked around and found that usually people get this kind of error when they for example forgot to link one of their public variables to an object back in unity. But i don't understand why i'm receiving it.
Here is the full error:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.GridPaintingState.UnregisterPainterInterest (UnityEngine.Object painter) (at
C:/buildslave/unity/build/Modules/TilemapEditor/Editor/Managed/Grid/GridPaintingState.cs:197)
UnityEditor.GridPaintPaletteWindow.OnDisable () (at C:/buildslave/unity/build/Modules/TilemapEditor/Editor/Managed/Grid/GridPaintPaletteWindow.cs:565)
Edit: I've added a screenshot of the error. It only shows up when the Tile Palette window is open and every time i hit play.
posting a screenshot will help better. Looks like installation of Editor went wrong or something similar. I am on Unity 2017.3f3 and everything is great.
@adnanpk here is a screen shot, it also shows how the error comes up every time i hit play.
This seems to be a bug when the "Tile Palette" window is open:
https://forum.unity.com/threads/nullreferenceexception-in-an-empty-project.509542/
Thanks you guys. Well other than then fact that it's annoying there doesn't seem to be much else and it sucks because i don't know how to fix it. I have tried removing and installing unity but the problem still persists. And thanks @pako from your link i didn't know there were others having the same problem. I will report the bug to Unity and hope they fix fast.
@SasukeBro I can see from the image you posted that you have the "Tile Palette" window open (just to the right of the Inspector tab). Just close the "Tile Palette" window and the problem should go away. Hopefully, Unity will fix this soon.
I had the same error as OP and also had the Tile Palette window docked alongside Inspector. The above solution (Closing Tile Palette tab) solved the problem for me.
I have the exact same problem, no solution I know of yet. Neither can I get raycasting to work.
Answer by Tojikan · Jan 30, 2018 at 08:03 PM
I got this error too.
I just opened up the palette you're using in the inspector and set a layer on it. It disappeared for me after that.
Your answer
![](https://koobas.hobune.stream/wayback/20220612144950im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Setting button intractability causes an error 1 Answer
There's an issue with this script I can't find 0 Answers
NullReferenceException: I have no clue why I am getting this error... 0 Answers
The unity collab button doesnt appear on the editor 2 Answers
Keep Getting NullReferenceException: Object reference not set to an instance of an object 0 Answers