Custom editor for class containing classes

Hey everyone,

I have a MonoBehaviour that I want to create a custom editor for, example:

public class SomeObject : MonoBehaviour
{
  public MetaDataObject Obj1, Obj2, Obj3;
}

public class MetaDataObject
{
  int SomeData;
  string MoreData;
}

Now, how can I edit the Obj1/2/3 inside SomeObject using the custom editor feature?

Thanks!

Add [System.Serializable] attribute to MetaDataObject class definition and you will be able to edit it with default inspector.

hi,

And how could I do the same if MetaDataObject class inherits from Monobehaviour?

Regards,
Jordi