Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

PS4 input not registering in a build, but works in the Editor

Discussion in 'Input System' started by Dibbie, Nov 14, 2019.

  1. Dibbie

    Dibbie

    Joined:
    Sep 2, 2014
    Posts:
    42
    For some reason, in the Editor, I can plug my USB PS4 controller and USB xbox controller in, and while im in play mode inside the Editor, both work perfectly fine as expected, but in a build, only the Xbox controller works, and the PS4 one is just straight up not registering any type of input what-so-ever

    So I decided to create a new project with JUST the PS4 input, assuming maybe something I coded weird in my previous project could be conflicting with the system, but everything I tried, and that my friend has tried as well (given, he has a PS3 controller), nothing has seemed to work in a build, only in the Editor.

    What might be the reason for this, or am I just doing something incorrect with the setup?

    This is my setup:
    upload_2019-11-14_16-48-8.png
    upload_2019-11-14_16-48-53.png

    Iv tried adding "Supported Devices" for Gamepads in general, PS4 specifically, and nothing so that all devices are recognized, and that didnt seem to change anything
    I also tried changing the Update mode to all 3 different options, which also seemed to do nothing
    Iv tried adding different interactions for each thing (im just using a joystick and "X" button to test for now)
    Iv tried specifying PS4 "cross", and gamepad "south" (which correspond to the same button)
    upload_2019-11-14_16-52-28.png
    Iv also tried setting up a "Control Scheme" and linking it to each bind (for example left stick gamepad, left stick PS4, south button gamepad, "cross" button PS4)

    And in code, I also tried using `SetCallbacks` as well, using the += subscription in Awake, Start, and OnEnable to see if the order Unity calls those functions matter, and so far everything works in the Editor, but in a build, none of those efforts made a change, whenever I press any button or joystick, just simply nothing at all happens, nothing gets registered, the UI text im using for display doesnt get updated at all - has anyone else experienced this problem with PS4 controllers?

    Iv attached a unitypackage of my setup, which includes the input manager im using from those screenshots, as well as my test script for input - is there anything else that might be useful to see?
    (I should also mention: Im using Unity 2019.2.11, and the latest version of the Input System from Package Manager - also I have my player settings setup that it only uses the new input system and not both)
     

    Attached Files:

  2. Osteel

    Osteel

    Joined:
    Jan 17, 2014
    Posts:
    59
  3. MlleBun

    MlleBun

    Joined:
    Sep 19, 2017
    Posts:
    163
    Last edited: Nov 17, 2019
  4. Dibbie

    Dibbie

    Joined:
    Sep 2, 2014
    Posts:
    42
    Thanks guys! Changing the build to x86_64 and playing around with the API compatibility level seemed to work (though im not sure if the API compatibility actually did anything or changing the folder it built to was what did it, the first time just changing the build to x86_64 didnt make any changes right away)