Reasoning behind Behaviour Class

As we all know, there is the behavior class.
JS users will never get to see it, as GetComponent(…).enabled will just work, unlike C# users that are forced to stupid cast around that thing.

As the behavior class does not seem to have any purpose other than that little enabled, I wanted to ask for the reasoning behind it, why enabled is not just part of component itself.
Or did I miss some specific use for the Behaviour class other than forcing clumsy codes for all C# users? :slight_smile:

I think you’re right that Behaviour exists solely to add the enabled member. It’s there because most other kinds of component (apart from Renderers) can’t be disabled and there needed to be some way of stopping those other classes from getting a member that’s irrelevant for them.

Javascript developers also need to do the cast if they’re developing for the iPhone, or using #pragma strict, or if they just don’t want to do it the slow way.

Also, even if Component had the enabled member, you’d still have to cast to the exact type for any class-specific functionality, so the benefit would be pretty minimal.