I would like to add some fields to what I see in the custom editor of a Mesh Renderer component. So I started by simply doing this:
[CustomEditor(typeof(MeshRenderer), true)]
public class MeshRendererEditor : Editor
{
public override void OnInspectorGUI()
{
// Show default inspector property editor
DrawDefaultInspector();
}
I was hoping that would essentially show me the exact view that I had prior to adding the custom editor. This is not the case, what I see is:
But what I had as default was this:
There are obvious formatting changes. With things grouped into collapsable sections. But there are also missing parameters like lightmap Parameters which is empty in the default view.
I don’t really care to recreate the wheel to try to have the same view as the default before a custom editor is provided, is there a way to
- Draw the default as it is shown without a custom editor plugged in?
- Code that is used by Unity to draw the editor for Mesh Renderer exactly as the default looks?