Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug UnityEditor.InspectorWindow.ShouldCullEditor: Nullreference

Discussion in 'Editor & General Support' started by BenjaminVintecc, Nov 19, 2020.

  1. BenjaminVintecc


    Feb 6, 2020
    Unity version: 2019.3.0f6
    Tested in: new clean project
    I want to make a simple attribute that does "GameObject.GetComponent(...)" together with a property drawer.
    My code to do this is correct but when I just create the property drawer I get the following errors (attachment)

    Sidenote: This error displays almost everytime when I compile in another project so it is very annoying.

    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.InspectorWindow.ShouldCullEditor (UnityEditor.Editor[] editors, System.Int32 editorIndex) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    UnityEditor.InspectorWindow.RebuildContentsContainers () (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    UnityEditor.InspectorWindow.RedrawFromNative () (at <6f28216fea9f453abf2e05b770ed3ee4>:0)

    rider64_DuXmc8yGCa.png rider64_hyTDYtS7nm.png Unity_4xWu5SLwDN.png
    synthc likes this.