[SOLVED] InvalidOperationException while executing 'performed' callbacks

Hi, I got a strange error which actually doesn’t block my game from running but is spamming my console and I don’t understand it.


and

Here is the configuration :

And here the only piece of code which call it :
5807044--614248--upload_2020-5-5_17-12-27.png

5807044--614251--upload_2020-5-5_17-12-48.png

This error occurs each frame when I press an input link to yAxis. And what is strange, is that I use the exact same system for xAxis but I got no error on it. The only difference is that I don’t use xAxis in 2 scripts unlike yAxis. But, I don’t think the problem come from my scripts, because if I desactivate them I still got the error.

The error is thrown from the UI input module (in particular, OnMove). Do you have the yAxis action linked to the “move” navigation action of InputSystemUIInputModule?

Yes ! Thanks :slight_smile:

@Rene-Damm I’m sorry, I got the exact same problem, but I don’t totally understand your answer.
Can you explain a bit more ?

In your eventSystem object you can configure which action from the map handle navigation, submit, cancel …
My issue was that I used a action set as an axis for the navigation of the EventSystem, and it wants a Vector2, so I simply do a second map, dedicated to the UI with a Vector2 for the navigation.

2 Likes

If someone is having this issue, and doesn’t understand why. Make sure Vector2 is UnityEngine.Vector2 not
System.Numerics.

2 Likes

In case it helps someone… I use a single callback function for actionTriggered to handle both mouse position and click but I was calling ReadValue<Vector2>() in both cases. Obviously this worked fine for the mouse position but caused the above error message during click because I was accessing the wrong input action.

@Rene-Damm I am having the issue that paul-masri-stone was mentioning directly above this, I’m confused on how he solved it?

8035265--1036091--upload_2022-4-10_17-23-14.png
Make sure your Composite type is set to 2D vector. Then it should work.

1 Like