Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

SetActive doesn't work

$
0
0
Well i'm trying to make a menu when the player press Q . and I made the menu as a gameobject and here is my code : var gg : GameObject; private var pauseEnabled = false; function Start(){ pauseEnabled = false; Time.timeScale = 1; } function Update(){ if (Input.GetKeyDown("q")) { if (gg.SetActive == true) { gg.Setactive(false); } else { gg.SetActive(true); } } }

Viewing all articles
Browse latest Browse all 1875

Trending Articles



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