Is component.enabled Deprecated? Did it ever exist?

In fact, did Component.enabled ever exist?

Is it deprecated or not, does anyone know?

In the Editor when you toggle a component on and off, what are you doing? Or, is it the case that (in fact) you can only toggle-on-and-off the, err, 20 or so derived which do have .enabled which appear in a list like this: Unity - Scripting API:

(Note that notably, Monobehaviour does have enabled, which as far as I know turns on and off the Update() function.)

So again in short … did component.enabled (as such) ever exist?

enabled is not deprecated. In Unity 4 they only changed the active handling: and GameObject.SetActiveRecursively() have been deprecated. Instead, you should now use the GameObject.activeSelf and GameObject.activeInHierarchy getters and the GameObject.SetActive() method.

You would still use enabled to enable and disable { items such as behaviours, as @robertbu said } [Ed: I slightly changed this sentence to avoid mass confusion! :slight_smile: ]

The component class itself never had an enabled property. A lot other built in components have their “own” enabled property, like Renderer, Collider, ParticleEmitter, … Those “enabled” properties have nothing in common except the name. In other words there’s no way to use some kind of base class to handle them all since they aren’t related (in the sense of inheritance)