#Input.GetKeyDown (Brackeys tutorial issue)

1 messages · Page 1 of 1 (latest)

cold widget
#

Hello, I'm following brackeys tutorial on pause menus, I have done this tutorial in the past but i'm having an issue witH the script. I have it set so that when I press esc I can view the pause menu. When I play the game the esc key doesn't work, I don't seem to have any syntax errors. Also tried building to my pc but it doesnt work in game either. Any advice would be appreciated

neon river
#

As with any bugs, you'd need to look into the code, add debugs or a breakpoint and see what executes or doesn't and why.

#

There's literally nothing else we can help you without more details.

cold widget
#

this my code

#

i can definitely try adding some debugs

#

@neon river i ran some test in the if statements, unity recognizes the key being hit but wont bring up the canvas. However when i enable the canvas before playing I am able to press the Esc to resume, which leads me to believe its the Pause function. Doing some more checks now incase I have left something out.

neon river
#

If you're still struggling after debugging, share the updated code(with debugs) and your setup in the scene.