- Home /
Whenever I press the Unity Editor's play button, I get this error:
NullReferenceException: Object reference not set to an instance of an object UnityEditor.PropertyEditor.DrawEditors (UnityEditor.Editor[] editors) (at :0) UnityEditor.PropertyEditor.RebuildContentsContainers () (at :0) UnityEditor.InspectorWindow.RedrawFromNative () (at :0)
Notes:
I still can play the scene, even with the error showing in the Console.
The error only pops up when I press the play button.
The error is clearable.
I think the error started about the time I played with the Canvas's Component "Canvas Scaler" I'M NOT SURE, but I undo all the changes, but the error still persists.
Answer by Playjoa · Apr 29, 2021 at 11:55 PM
I was having a similiar issue! I had 2 inspectors opened in my project! Closing one of them made the error to stop (Using Unity 2020.3.5f1). Not sure if closing the inspector was the solution but it was the last thing I tried to make the error go away!
I closed second inspector window and that error is gone, thank you. (Unity 2021.1.22)
I closed all duplicate panels ( Project and Inspector ) tabs and it worked.
Thanks! Closing duplicate inspector window makes the error goes away. For me, it seems to happen since I place a CustomEditor script which filename does not match the editor class name into the project. Never had this error in 2019.4 though.
Answer by StrykerWildfire · Aug 19, 2021 at 10:31 AM
Window > Layouts > Default
Worked for me.
This is so bizarre, especially since, to my knowledge, I didn't have any duplicate windows open, but it worked!!!! Thank you so much!
(Unity 2020.3.24f1)
Answer by manirana94 · Jun 23, 2021 at 09:45 AM
Close all duplicate screens/Panels on the Unity editor and restart unity error will go away
Answer by snymanf2020_unity · Feb 05 at 05:06 AM
Same problem here but it only went away by closing my inspector tab and re-opening it again.
Thanks anyway everyone!
Answer by mozikr · Apr 08 at 04:23 PM
Window -> Layouts -> Reset all layouts (Unity 2020.3.27f) It helped me
Your answer
Follow this Question
Related Questions
Array Out of Index (When it Really is not??) 1 Answer
Moving file failed (Temp/Backupscenes) when starting Game Mode - every Unity version, every project 1 Answer
Unexpected exception System.IO.EndOfStreamException: Unable to read beyond the end of the stream. 1 Answer
Error opening project.,Error opening project 0 Answers
Blender could not convert .blend file to FBX file MacOs 1 Answer