Struggling Learning New Input System
I am very new to coding and unity. I am currently trying to rebuild the Google Chrome dinosaur game. I’m trying to get my character to jump. I already set up my own input action maps, and actions where I bound the space bar to the jump action.
Now I am trying to actually get this to work in my script. I have been watching many tutorials and it seems like everyone approaches this differently. Some people use the awake function some people use OnEnable function and OnDisable function, some use the FixedUpdate function, and some use their own custom function (i.e. Jump())).
Some people establish references to the InputActions, or PlayerInput component, or another class. Some people use callback context, etc.
I’ve tried following the code people use in their tutorials for many different tutorials and nothing is getting my sprite to respond to the space bar press.
I know there’s probably not one right way to do this, but for this example, I simply want to know what is the most straightforward way to get my sprite to jump when I click the spacebar using the new input system?
If anyone has advice, or suggestions, please let me know! Thanks in advance :)