This doesn’t happen in the editor, but once I get into Visual Studio and when I deploy to Xbox One this becomes an issue.
With one controller, everything works great. Once I turn on a second controller, any button press for “Submit” triggers multiple times (even if I try to just tap the button, on the same controller that just worked great a second ago) and then I am unable to open menus without the controller selecting something on the next page automatically.
This has never been a problem, and I am using essentially the same input setup in Unity that has worked for a few years.
I posted in the “Help Room” but haven’t had a response there. Any help or suggestions would be great. Thanks!
I don’t have a way to post images, but I have my input setup for “Submit” using the positive button “joystick button 0” for the a button on the controller like below:
Name: Submit
Positive Button: joystick button 0
Gravity: 3
Dead: 0.001
Sensitivity: 3
Type: Key or Mouse Button
Axis: X axis
Joy Num: Get Motion from all Joysticks
On the UI.Button, I am using the “OnClick” function to call my menu change.
It is like it is firing on the “press” instead of the release?
In the “Event System” I have it currently set to 5 input actions per second, and a delay of 0.5, but that only seems to help in the editor. It is in VS/PC and Xbox where it triggers like crazy.
Firing on press isn’t horrible, but since it then repeats before I even release it is essentially breaking everything when the second controller is active. It is so strange
Sure. I don’t have any real bug output I can show, but I can try to detail the problem like I did here.
Now, even when only using one controller it still fires on press as opposed to release, is that not something that anyone else has problems with? When I use the mouse, or the keyboard I am able to “hold” the button down and it doesn’t trigger until release on those controls.
Ok, bug report submitted with video of the issue while in VS and then a few screenshots of my Input setup and one of the UI.Button items in the editor, just to make sure it isn’t something I am doing accidentally.
I recall QA saying it was fixed in 2018.3 but I have not been able to test it yet. As of 2018.2.17f1 the issue still exists. However, in my case, I can reproduce it without connecting a second controller.
I’m having the same issue, using the latest Unity 2018.3.1f1.
If I have only one controller plugged in, I have no issues. But if there are two or more controllers connected, the buttons are firing (just like a GetButton() instead of a GetButtonDown())
Did you found a way to fix this ?
It’s very annoying for my menus on my local-multiplayer game coming on XBox…
I have created a brand new project in Unity.
I added in the scene an Image and a button.
I created a script that I attached to an empty game object in the scene, with the following code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class UIManager : MonoBehaviour
{
public void ToggleImage(Transform image)
{
image.gameObject.SetActive(!image.gameObject.activeInHierarchy);
}
}
On the button, in the OnClick() parameter, I’ve added the game object with the script and selected the ToggleImage with the image transform.
On the EventSystem, I have set the “First Selected” variable to be the button, and I checked “Force Module Active” in the Standalone Input Module.
In the Editor, everything works fine, meaning anytime I press the button, the image is toggle on or off and nothing more happens if I keep the button hold.
If I export my game on my XBox, then the issue arise.
If I have only one controller plugged, everything works fine. But if I plug a second controller, then when I press my submit button, the image starts flickering, toggling on and off repeatedly.
I didn’t really new what you needed and how to give you what you need, so I created a .rar with everything in (Unity Project, UWP VS Solution and Exported Packages in Release x64) that I have uploaded on my own FTP.