Class extends Object but does not inherit variables

I have essentially the following:

class MyClass extends Object {
    function MyClass () {
        hideFlags = HideFlags.HideInHierarchy;
    }
}

And after compiling, I’m getting an “Unknown identifier: ‘hideFlags’” error. Am I not understanding inheritance properly? Object has the variable hideFlags, so shouldn’t any class that extends from it?

Qualify the Object type with the name space and you should be good to go, worked for me:

#pragma strict

class MyClass extends UnityEngine.Object {
    function MyClass () {
        hideFlags = HideFlags.HideInHierarchy;
    }
}