setActive working only with some objects?

Hey guys,

I’ve come across such a funny problem: I’m trying to disable objects on mouse click using setActive(false). funny thing happens: some objects reacting to this, some not. with those which are not reacting to this method gameObject.renderer.enabled=false works.

Anyone came across such an irritating thing maybe? Anyone has a solution for that?


This is because SetActive is used for Enabling/Disabling GameObjects. renderer is a component which is when you’d use .enable/disable = true/false. GameObject.SetActive