How Do I deActivate One Sphere ?

I have three Spheres in a scene. I want two to be active and one to be deactive…I want the Sphere to remain visible in the scene but I just don’t want it to do anything…I want to just turn it off so it sits there and does nothing. But I can’t quite figure out how to do it? Maybe I have the syntax wrong? Or maybe it’s something else. I have –

Sphere (1)

Sphere (2)

Sphere (3)

I’ve tried all sorts of stuff like Sphere(1).SetActive(false); I’ve used GameObject and gameObject and included <> and () and all sorts of combinations of these but I just can’t quite get the right command. Maybe it can’t be done…but my guess is that I just don’t know what I’m doing.

Use the Destroy.component function. It’s simple and does exactly what you’re describing.