Question by
Creative Inventory · Aug 27, 2015 at 01:10 PM ·
menuchangepause
Pause menu Change
How do I change this code, so that when the player clicks on the button (my pause button, i added in the game) it pause the game, instead of pressing "P" to pause:
if (Input.GetKeyDown (KeyCode.P)) { isPaused = !isPaused; }
Comment
Add button component on the button and register the event like Onclick method. @creative inventory
Your answer
Follow this Question
Related Questions
Pause Menu Script TimeScale problems 1 Answer
Pause menu not called when ESC pressed 2 Answers
Pause menu unpausing 1 Answer
How to stop the game but not the menu animations? 0 Answers
Unity coding problem 1 Answer