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

How to make a gameObject invisible in unity

$
0
0
I am attempting to make a Unity gameObject invisible through code. So far I have tried (On a script attached to the gameObject I want to make invisible): `this.renderer.enabled = false` `this.enabled = false` `this.gameObject.enabled = false` `this.gameObject.renderer.enabled = false` And on my player script: `other.gameObject.enabled = false` `other.gameObject.renderer.enabled = false` I have also tried `Destroy (other.gameObject)` but it doesn't achieve what I want from it. Thanks for your help

Viewing all articles
Browse latest Browse all 99

Trending Articles



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