Search Unity

NullReferenceException at UnityEngine.UI.Graphic.get_depth

Discussion in 'UGUI & TextMesh Pro' started by Sebioff, Jun 25, 2020.

  1. Sebioff

    Sebioff

    Joined:
    Dec 22, 2013
    Posts:
    218
    We occasionally get this exception with the latest 2018 LTS release (2018.4.23), at which point the entire UI stops responding:

    Code (CSharp):
    1. NullReferenceException
    2. UnityEngine.UI.Graphic.get_depth () (at <69772e87ab5f45bb9d297c85a74a5ffd>:0)
    3. UnityEngine.UI.GraphicRaycaster.Raycast (UnityEngine.Canvas canvas, UnityEngine.Camera eventCamera, UnityEngine.Vector2 pointerPosition, System.Collections.Generic.IList`1[T] foundGraphics, System.Collections.Generic.List`1[T] results) (at <69772e87ab5f45bb9d297c85a74a5ffd>:0)
    4. UnityEngine.UI.GraphicRaycaster.Raycast (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List`1[T] resultAppendList) (at <69772e87ab5f45bb9d297c85a74a5ffd>:0)
    5. UnityEngine.EventSystems.EventSystem.RaycastAll (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List`1[T] raycastResults) (at <69772e87ab5f45bb9d297c85a74a5ffd>:0)
    6. UnityEngine.EventSystems.PointerInputModule.GetMousePointerEventData (System.Int32 id) (at <69772e87ab5f45bb9d297c85a74a5ffd>:0)
    7. UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) (at <69772e87ab5f45bb9d297c85a74a5ffd>:0)
    8. UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () (at <69772e87ab5f45bb9d297c85a74a5ffd>:0)
    9. UnityEngine.EventSystems.StandaloneInputModule.Process () (at <69772e87ab5f45bb9d297c85a74a5ffd>:0)
    10. UnityEngine.EventSystems.EventSystem.Update () (at <69772e87ab5f45bb9d297c85a74a5ffd>:0)
    11.  
    Unfortunately we can't properly reproduce it so far, but maybe someone has seen something similar happen and has an idea what might be going on?