Cross Platform Input not working

heres the code Im using, not getting ANY errors, but it console logs 0 and just stays there. joystick A, D,
left, right, not working. please help!

Im not sure how I solved this, but I did. Messed around in Edit/Project Settings/Input Manager only to break everything horribly, and when I reconfigured and put everything back it worked…no idea but I have a working game. This will probably come up again at some point. Im seeing a lot of chat making it clear that Unity 2019 has a few bugs when running the 2017 standard assets package.

I am no expert, but found using Unity 2019 that I needed to use
Input instead of CrossPlatform.

I never was able to get the buttons on my game pad to fire, but was able to use the right joystick. My code for that looks like this (in case this is helpful):

private void ProcessFiring()
{
    if (Input.GetButton("Fire") || Input.GetAxis("Fire1") >= Mathf.Epsilon)
    {
        SetGunsActive(true);

    }
    else
    {
        SetGunsActive(false);
    }

Good luck!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms