accessing through inspector a inherited var

Hello,

First of all, I’d like to say that I don’t have experience with unity, so I’m sorry if my question seems nonsense, but I was looking at the forums for something like that and I couldn’t find.

So, to the question:

I’m using UnityScript and I’d like to use class and inheritance.
But I have a problem accessing a member variable when using “extends”

I have a

class **Foo** extends MonoBehaviour {
 var x : GameObject;
 var y : String;
}

and a

class **Bar** extends Foo {
 var z : int;
} 

if I add Foo script to an object I can see x and y in my inspector window, but if I add Bar, I can’t see Foo member variables nor ‘z’. Am I missing something?

I’d bet that the inheritance is not working and Bar is not reaching MonoBehaviour, but why is that happening?

Does inheritance works?

Yes, It does work correctly, I just saw a couple of minutes after asking the question that My className and my fileName wasn’t the same, changing the fileName made it work.

I don’t know about UnityScript on this topic, but C# shows inherited members.