Extending Unity Editor for custom classes

Hey guys! I need to extend Unity Editor in order to support custom class editing. Let's say I have the class Foo with two variables bar and baz, and many objects have array of Foo's. Which class do U have to extend? I tried with Editor but that class only allow me to override the behaviour for certain classes

Thanks in advance

You need to extend MonoBehaviour in order for a class to appear in the Inspector.

But if you want your class Foo to appear as a variable in your MonoBehaviour it needs to be Serializable.

[System.Serializable]
public class Foo
{
 public int MyInt = 0;
 public float MyFloat = 0f;
}

For further detail you can see the answer to my question here: http://answers.unity3d.com/questions/4238/how-can-i-make-a-custom-inspector-for-this-object-in-c