Hello, me and my friend are pretty new to Unity, as well as C#, we are having trouble with a bug in our game.
Whenever you press two different inputs on the same frame they both happen at once, this is causing bugs in the game. We want only one input to be able to be pressed on each frame. Below is a test script for reference:
What we want is either for the 2nd input to run the next frame to avoid bugs or for only one of the inputs to run when you try pressing to keys at the same time.
I don’t think so that both will happen on the same frame because in one frame only one condition will run.
You can test this with making a temporary bool and mark the bool to true whenever one condition became true and then set the bool to false like after 5 second to only test if both are occurring on the same frame or not.