"Pointer should have exited all objects.." - Error

Hi,
After I upgraded to the recent version of the Input System I get the error “Pointer should have exited all Objects before being removed” when clicking. Does anyone know what this is about?

I’m using a mouse and a virtual mouse (generated from a leap motion) at the same time… the rollovers are triggered just fine, the errors appear when clicking anything, the clicks are visible in the debugger but do not trigger any buttons.

With some tinkering I found that the Pointerbehaviour of the InputSystemUIInput Module of the EventSystem should be set to “all pointers as is”. Multiple pointers work like a charm now, I can use two hands and a mouse simultaneously with my UI…

6 Likes

Any chance you could file a ticket with the Unity bug reporter with the project that triggers that. Regardless of the setup, the assert shouldn’t be hit. Looks like the UI module isn’t properly cleaning up a pointer.

Great to hear :slight_smile:

Hi!

I’m working on migrating to the new Input System. I was running into the same issue here, except without the virtual mouse. I was also able to stop the error by changing to “All Pointers as Is”. However, I then started to notice that my onClick events were firing twice.

Eventually I traced this back to the “Simulate Touch Input from Mouse or Pen” setting being on in the Input Debug window. Since turning that off, I was able to switch the Pointer Behavior back to “Single Mouse Or Pen But Multi Touch and Track” and no longer see the double onClicks

One thing to note is we have 2 scenes loaded additively with an EventSystem in each. I was originally suspicious that might be the problem, but wasn’t able to get a setup working with just one EventSystem.

For now we can avoid the use of the Simulate Touch Input setting!

1 Like

Same problem here @Rene-Damm

New Input System package + Input System UI Input Module + EnhancedTouchSupport + Simulated Touch = Pointer should have exited all objects before being removed

Have you solved this problem?

I still have the same problem.

@bdovaz I finally solved this problem! As it turned out, it was not because of the “Input System UI Input Module + EnhancedTouchSupport + Simulated Touch”. It so happened that there was a canvas on my scene, but there was no Event System with Input System UI Input Module. After I added it, the problem disappeared.
(On my canvas, there were scripts using InputAction with “Press [Touch screen]” binding.)

In my case the problem it’s still there.

Same for me: when I turn on simulated Touch, in script and in the options menu pressing a button generates the error:

Pointer should have exited all objects before being removed
UnityEngine.EventSystems.EventSystem:Update()

I’m constantly getting this Error. I’m not even using Simulated Touch. I’m testing the app on real android devices and after the first tap/touch, every tap after that throws this error. I have two Canvases in my scene, both without Graphic Raycaster components, as they aren’t interactable.

When dragging my finger over the touchscreen the error happens less often, but still about once a second.

These are my controls:

This is my event system:

Also, I have a game over screen that has a UI button that doesn’t work with touch input (works with mouse input though). This is a scene I’m loading additively that simply has a canvas with the UI elements. This canvas does have a Graphic Raycaster, and the button is marked as interactable. I’m suspecting that this error has something to do with the button not working.

1 Like

THIS WILL NOT WORK WITH NEW INPUT SYSTEM GO BACK TO OLD INPUT SYSTEM THEN IT WORK THAT ALL I GOT WITH NEW UNITY SYSTEM

Just ran face first into this as well…

with Touch Simulation enabled, all of the defaults of Input System UI Input Module just outright fail to work in any consistent manor.

Once again mobile support is 100% unusable with the new InputSystem :frowning:
@Rene-Damm This is getting pretty ridiculous… without proper Unity Remote support at first, and now simple “Mouse == Touch” just not working, there is no way to use the new InputSystem with mobile at all!

2 Likes

Currently looking into it (ticket). Sorry this wasn’t fixed for preview.2.

looking forward for news here too, same problem.

Unfortunately I have this issue too. Any updates?

Not for the moment, you can always check here
https://issuetracker.unity3d.com/issues/new-input-system-simulated-touch-in-editor-doesnt-work#comments

I’m having the same issue, I enabled virtual touch and got the “Pointer should have exited all objects before being removed” error. I can see the project running on my android device, but the touch screen doesn’t seem to send input to Unity.

I have to say this is really annoying, it makes it virtually impossible to test my game without rewriting scripts, or rebuilding every time. Are there any other workarounds?

Any news about it? I test this problem in a demo project and on a real Android device. If I press a finger on the screen and use another finger to press a button or a image, this error will occurs. But after I change the action type of Click to pass through, the error disappears. But this error still appears in our game project even if I chagned the click action type to pass through.

1 Like

Keeping an eye on this too, have reverted back to the old input system now as this new one, though looking promising does not yet seem quite robust enough but looking forward to giving it another go in the future.