Input System package not working for MacOS?

Currently in an Intro to Game Development class and for our first “game” we had to make a platformer. In reality, it was just a test run to see if we could get movement mechanics down in the engine before we move to larger projects.

I’m currently working on a Macbook, and when I tried implementing the Input System package from the Unity Registry, it mostly worked. However, if I tried to use On Input System Event Vector 2 for the Left/Right movement, it would not register any Left/Right button holds. It would only register when the buttons are pressed, even though I specifically had the On Input System Event Vector 2 as an On Hold instead of On Pressed.

It looks like a good chunk of my classmates are also running into this issue, curiously enough all of us are working on MacOS. We were wondering if the OS was causing some complications with the script in our games.

Hello when creating a game on Mac and on windows there should be no difference.
Can you type more details? Thank you

I apologize since this is gonna be a lot, but I’m going to go step by step in how we reached the wall we’re at:

  • Open Unity Hub
  • Create a 2D Game using the 2D Game Stencil and the 2022.3.8f1 Editor Edition
  • When the scene is open, go to the Window tab on the top of the screen, click it then click the Package Manager tab
  • In the Package Manager window, click Packages next to the “+” sign and then click on the “Unity Registry” tab
  • Type in “Input” in the search bar of the Package Manager window, then download the Input System package (Version 1.6.3., July 17, 2023)
  • Go back to Unity and create two 2D object sprites: a capsule and a square object
  • Rename the capsule as "Player’ and the square as “Ground”
  • Add the following components to the Player object: Script Machine, Player Input, Rigidbody 2D with a Z Freeze Rotation, and Capsule Collider 2D
  • Add the following component to the Ground object: Box Collider 2D
  • In the Player component “Player Input”, in the Actions tab, double click and there should be a menu that lists actions currently bound to the Player, which should include the actions “Move”, “Look”, and “Fire”.
  • Next, go to the Player component “Script Machine” and click Edit Graph, which should open up the Visual Script editing graph.
  • To test whether the player can move, we added two nodes: one “On Input System Event Vector 2” node with the below tabs set as “On Hold” and “Input Action: Move”, and one “Rigidbody 2D: Add Force” and set the force to 10.
  • Connect the On Input System Event Vector 2 arrow on its right to the Rigidbody 2D: Add Force arrow on its left
  • Click the Play button on the top of the Scene window
  • What is expected is that, once the game loads, you will be able to control the capsule Player and move it to the left or right using the arrow keys on your keyboard. Specifically, you should be able to hold down the arrow keys to continuously move left to right, which is how the students with PCs were able to get their players to move.
  • In reality, all of the students using MacOS were not able to hold down their left and right arrow keys to continuously move their player character left or right. Pressing and holding the button only moves the player once, and very slightly at that.
  • Please keep in mind that the visual script is the exact same between MacOS students and PC students, that is why we are asking these questions, as there seems to be a rather big difference in how Unity reacts to the inputs of either operating systems.

Hopefully this is enough information to help understand our current situation. Visual Script so far has been the most easiest and helpful way of getting the students to understand Unity, but it would be unfair to force the MacOS to go through roundabout ways to achieve the same goals as the PC students who can use the Visual Script with no issue.

Hi, I don’t make 2d games in unity but I found this tutorial on youtube:https://youtu.be/K1xZ-rycYY8?si=q0XHEkFf0wLhAie_
please play it.