UI not working / unresponsive on iOS

Hi guys,

So this just started happening to me today and I can’t seem to figure out what has happened. The UI on iOS has stopped working properly. When you click on say, a Button (the pause button), it should bring in the pause menu. The button knows its being clicked, because it fades in and out, but the menu is not appearing. It takes like 10-20 clicks for the UI to do what it’s supposed to do. This is happening on the entire UI, not just one pause button. When the UI does respond, it behaves the way it should. Buttons move in and out as expected, and the proper functions get called.

I am not experiencing this problem in the editor / mac os.

Also, I’ve tried upgrading to 4.6.1p3, deleting all the iOS build folders, restarting the computer, and rebuilding from scratch.

Any thoughts?

1 Like

Well, the plot thickens. This is happening specifically in-game, not in my main menu. This is also not an issue on the Unity UI Demo scenes that were distributed with 4.6. It’s like my prefab is busted.

Well, no idea what happened here - but the ‘EventSystem’ object in my prefab is corrupted somehow. When i removed it, and added a new EventSystem, everything went back to normal. This explains why the main menu worked, it uses a different EventSystem object.

So, it looks like this problem is back and I have no idea how to fix it. Any thoughts on this would be much appreciated. Basically, sometimes my EventSystem gameobject kind of ‘breaks’ and becomes incredibly bad at responding to touches. When clicking the buttons, the buttons react (they fade in/out) but nothing gets executed. Would love some insight here.

1 Like

Well, an update for anyone who is interested.
I believe (but not 100% certain) that these issues occurred because I enabled “Standalone Input Module” for “activation on mobile device”. When unchecked, my level went back to normal. I have not experienced any problems since unchecking that box. Might be something the Unity guys want to check.

1 Like

yea we know there as sometimes issue between the two modules. Standalone seems to take priority when it shouldn’t

1 Like

This is infact something i bug-reported ages ago but still nothing :stuck_out_tongue:

I have a similar problem, it works perfectly on Android but not in iOS (have to click tons of times until the button reacts)

1 Like

I still have this issue, and so many years later I cannot find a solution anywhere

I am having this exact same issue still, will report as a bug and put the bug case number back here so we can track it. Others should do the same.

Reported at (Case 1291989) [UI][AR Foundation] Worldspace UI buttons work fine on Android but intermittently on IOS while in AR

Did you have a fix for this? @bean-man

I have a similar problem, which only occurs on iOS: After some time playing, the buttons and event triggers stop being responsive, as if the event system was no longer in the hierarchy. However, I am sure that it is not a problem related to an absence of the event system, because I made a special function that re-instantiates another one if one is not present in the hierarchy. Furthermore, this problem only occurs in the iOS version of my game, it doesn’t occurs in Android. I’m using Unity 2022.3.22f1

In the Xcode logcat, I got the following error:

NullReferenceException: Object reference not set to an instance of an object.

at UnityEngine.UI.GraphicRaycaster.Raycast (UnityEngine.Canvas canvas, UnityEngine.Camera eventCamera, UnityEngine.Vector2 pointerPosition, System.Collections.Generic.IList1[T] foundGraphics, System.Collections.Generic.List1[T] results) [0x00000] in <00000000000000000000000000000000>:0

at UnityEngine.UI.GraphicRaycaster.Raycast (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List`1[T] resultAppendList) [0x00000] in <00000000000000000000000000000000>:0

at UnityEngine.EventSystems.EventSystem.RaycastAll (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List`1[T] raycastResults) [0x00000] in <00000000000000000000000000000000>:0

at UnityEngine.EventSystems.PointerInputModule.GetTouchPointerEventData (UnityEngine.Touch input, System.Boolean& pressed, System.Boolean& released) [0x00000] in <00000000000000000000000000000000>:0

at UnityEngine.EventSyste<…>

in the editor:
MissingReferenceException: The object of type ‘CanvasRenderer’ has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.UI.GraphicRaycaster.Raycast (UnityEngine.Canvas canvas, UnityEngine.Camera eventCamera, UnityEngine.Vector2 pointerPosition, System.Collections.Generic.IList1[T] foundGraphics, System.Collections.Generic.List1[T] results) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/GraphicRaycaster.cs:317)
UnityEngine.UI.GraphicRaycaster.Raycast (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List1[T] resultAppendList) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/GraphicRaycaster.cs:218) UnityEngine.EventSystems.EventSystem.RaycastAll (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List1[T] raycastResults) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:276)
UnityEngine.EventSystems.PointerInputModule.GetMousePointerEventData (System.Int32 id) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/PointerInputModule.cs:295)
UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:548)
UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:534)
UnityEngine.EventSystems.StandaloneInputModule.Process () (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:282)
UnityEngine.EventSystems.EventSystem.Update () (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:530)

Is it a Unity/iOS Bug?