Display Property based on its dynamic type

`
[system.serializable]
class Animal {
public int age;
}

[system.serializable]
class Tiger: Animal {
public GameObject prey;
}

[system.serializable]
class Deer: Animal {
public string feed;
}
class MyClass: monobehaviour{
public Animal MyAnimal;
}`

Say in the scenario above, and I’m writing a custom inspector for MyClass. Is there a way to display the field ‘MyAnimal’ according to its actual type. E.g if it’s a tiger, display age and prey; If it’s a deer, display age and feed.

Thanks!

I have figured out a solution which can be found in my blog here. http://www.stephengou.com/blog/unity-dynamic-property-field