Question by
KogsKogs · Dec 10, 2017 at 04:16 PM ·
camerauiraycasteventsystemuser interface
NullReference in Eventsystem Raycast eventCamera
Hey,
we just got an error report from a user. His game just froze, we cant reproduce it.
Maybe you guys have any idea.
NullReferenceException: Object reference not set to an instance of an object
at UnityEngine.UI.Graphic.Raycast (Vector2 sp, UnityEngine.Camera eventCamera) [0x00000] in <filename unknown>:0
at UnityEngine.UI.GraphicRaycaster.Raycast (UnityEngine.Canvas canvas, UnityEngine.Camera eventCamera, Vector2 pointerPosition, IList`1 foundGraphics, System.Collections.Generic.List`1 results) [0x00000] in <filename unknown>:0
at UnityEngine.UI.GraphicRaycaster.Raycast (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List`1 resultAppendList) [0x00000] in <filename unknown>:0
at UnityEngine.EventSystems.EventSystem.RaycastAll (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List`1 raycastResults) [0x00000] in <filename unknown>:0
at UnityEngine.EventSystems.PointerInputModule.GetMousePointerEventData (Int32 id) [0x00000] in <filename unknown>:0
at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (Int32 id) [0x00000] in <filename unknown>:0
at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () [0x00000] in <filename unknown>:0
at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <filename unknown>:0
at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <filename unknown>:0
Comment
I'm experiencing the same issue myself, where some users get this error for no clear reason... I am using Unity 2018.3.9. Any idea what is causing this and how to fix it?
I ran into the same problem today, when building an iOS app that previously ran perfectly (exact same code version). All of the sudden, I am getting these errors if I tap one of the interface elements. Did you ever find out why this happened?