Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

How do i deactivate a GameObject from js

$
0
0
I have a simple script I want to deactivate a gameObject that it is attached to. This is what I have but it does not work #pragma strict public var SubtractOne : GameObject; function Start () { game.noOfHits = -1; SubtractOne.SetActive(false); } function Update () { } Thanks Brandon

Viewing all articles
Browse latest Browse all 171066

Trending Articles



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