This is configured slightly differently.
Add some objects to your scene.
Go to Window > Package Manager
Open the package manager and select Unity Registry to see all of the options.
Search for Input System and then install
You might get a warning message, if you do select Restart
Player input is not yet configured.
You will be asked where you want to save the input actions config file.
Drag the input actions file to the Component
If we run the program the object won’t move as we haven’t added code to do this yet.
Create a new C# script called PlayerController
Drag the script onto the player object
Double click the script to open it in the code editor
Add the InputSystem to the player controller
Add the OnMove function. This functions detects user input and we then get the x and y movement and stores this as a 2D vector. We then assign the x and y values to the variables we created earlier.
Here we are using the Update() function. This will run once per frame. If you want it to update on a fixed time use FixedUpdate() instead.
As we are using a 3D game we need to convert the 2D vector into a 3D vector. Note here we have change the y value to be on the z (depth) axis.
We then use the AddForce function of the Rigidbody to move the object by the vector multiplied by the speed.
Save the script
You can now see the public variables
Set the speed to a value you want
You now have a working input system