RewiredStandaloneInputModule does not generate duplicate events. If identical duplicate events are actually occurring, you must have multiple Event Systems in your scene. Delete all other objects with the EventSystem component on them. EventSystem is designed as a singleton and only one can exist in a scene (except in very special cases where multi-EventSystem handling is required but that needs special configuration.)
I have only rewired event system and when a button is selected, it sends twice the event onclick from the unity button events. So if you press submit button, it sends the button down and button up. I am using events triggers due this and doing the gamepad logic in script (as events triggers (on pinter down) dont get fired when using gamepad.
Hi Migulefanclub,
In my testing, onClick() captures the pointer click as well as the joystick button Submit event, so if you add an event trigger for Submit then you get both events. I dropped the Submit event trigger, but kept some other event triggers for joystick compatability.
Problem: Receiving duplicate mouse clicks when clicking on a UI button
Do not assign UI Submit or Cancel Actions to Mouse Left Button or Mouse Right Button or you will receive double-clicks evey time the mouse button is pressed over a button. The mouse button click on a UI element is based on mouse cursor position and does not use the Action system.
Unity’s UI is designed to have two completely different systems for Keyboard/Joystick and Mouse. The Keyboard/Joystick system uses the Navigation system, which involves setting an active selected GameObject in the EventSystem, and the InputModule sends directional navigation events, OnSubmit, and OnCancel events to the currently selected Selectable GameObject in the Event System. This system is only for keyboard/joystick navigation.
Mouse navigation does not use any of the above. It uses the mouse pointer position on-screen and the InputModule sends OnClick, OnPointerEnter, OnPointerExit, etc., events to the Selectable on the Game Object under the mouse pointer. Unity’s system does not support a Cancel functionality for mouse input.
Mapping OnSubmit or OnCancel to mouse buttons will cause the currently selected GameObject in the EventSystem (if one is selected) to receive these events regardless of where the mouse is on the screen. This is normally not what you want to happen when using a mouse pointer.
Hey I have some question. I’m new on controller game but I interest in this Input. Can it read Gyroscope from Nintendo Joy-Con? and if it can. Can you tell me how? Thanks for helping.
p.s. My English isn’t that great.
I can’t discuss anything specific to the Ninendo Switch platform on a public forum because the API is covered by NDA. See the documentation that came with the Rewired Nintendo Switch plugin if you want to know how to use Switch-specific functionality on the Nintendo Switch platform.
It looks like those PDBs are missing on this machine.
On another machine where i have a clone of this repo, those PDB files exist.
I’m not really sure if these files should exist and/or if they should be committed to VCS.
However, what happens is that I’ll commit these changes, and then the other machine just recreates metafiles again because the PDBs exist on there. I then get these removal changes again, etc… I’m stuck in a loop.
Question:
How might have this happened? Is it possible rewired was somehow installed without x64/x86 support on one machine, but not on the other? What is the remedy and how would I go about making sure I don’t run into this issue again? Should I be making sure these pdb files and their meta files are not tracked?
Rewired does not explicitly install these files. They are simply included in the Unitypackage archive. Any issues you’re having with missing files would have come from your end. Something on your system deleted these files, didn’t copy them, or put them in a different location.
gitignore would usually exclude PDBs, DLLs, and other binaries. The meta file would be tracked. Meta files should not be excluded from git because they have unique GUIDs. Unity will recreate these files but with different GUIDs. This will cause problems when you upgrade Rewired because Unitypackage replaces files based on GUID and your GUIDs will not match those inside the Unitypackage.
I can’t tell you exactly what happened or how to prevent it, but I can tell you Rewired didn’t cause the issue. Reinstall Rewired from the Package Manager and make sure these files are included in the Unitypackage import options.