Quantcast
Channel: Questions in topic: "renderer.enabled"
Viewing all articles
Browse latest Browse all 99

I am trying to create a togglable game menu using the ESC key

$
0
0
This javascript is men't to make a toggle game menu but when i press ESC nothing happens. I have tried other key combos as well. I am sure its something simple. Any help would be much appreciated. renderer.enabled = false; gui = false; function update () //this enables a plane in front of the camera to be visable and pauses the game after pressing ESC { if(Input.GetKeyDown("escape")){ renderer.enabled = true; Time.timescale = 0; gui = true; } // if you press ESC again it will un-pause the game and turn the plane to invisible if(gui && Input.GetKeyDown("escape")){ renderer.enabled = false; Time.timescale = 1; gui = false; } }

Viewing all articles
Browse latest Browse all 99

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>