Switching platforms leads to compiling error! PLEASE HELP
This Script belongs to an old project I made in 2017, I published it after switching platforms from Windows to Android and it worked out just fine. A few years went by and Google took the game down from the PlayStore and I had to make a new build and publish it again using the new App Bundle, no problem. I update Unity and get the 2019 version and when I try to switch platforms it says I have an error regarding my scripts. It's basically just the "Input" when I call Input.GetKeyDown(KeyCode.Space). Other than that I think it should work. Can someone please help me replace the Input with something that works on the android platform? void Update() { if (isDead == false) { myRigidBody.velocity = new Vector2(moveSpeed, myRigidBody.velocity.y);
         if (Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButtonDown(0))
         {
             myRigidBody.velocity = new Vector2(myRigidBody.velocity.x, jumpForce);
         }
        
     }
 }
 
              Your answer
 
             Follow this Question
Related Questions
Can not load the next scene 0 Answers
Exception: Field currentActivity or type signature not found 0 Answers
Animator scripting error C# - Only WalkingRight Movement Animates 0 Answers
Unity 2D Build Error 0 Answers