Hi,
I am trying to perform some operations when user performs the submit action. I am using following code to register an event handler for the performed event of the submit action. However I can see the the event is fired twice:
var actionMap = inputActionAsset.FindActionMap("UI", throwIfNotFound: true);
var action = actionMap.FindAction("Submit", throwIfNotFound: true);
action.Enable();
action.performed += Submit_performed;
Following are the checks I have done so far:
-
The event only gets registered once.
-
The CallbackContext.phase is performed in both calls.
-
The CallbackContext.performed is true in both calls.
-
If I create an action in the script - say for handling user pressing “x” button - the performed event only gets called once.
Hope someone can help me with this.
Regards,
Aydin