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
↧