I have a custom editor window.
I would like to display the inspector for a selected UnityEngine Object in my editor window.
Say for example, a prefab / instantiated gameobject.
I create the editor for the object like this:
Editor objectEditor = Editor.CreateEditor(object);
In my OnGUI function, I call the following 2 functions:
objectEditor.DrawHeader();
objectEditor.OnInspectorGUI();
The header displays ok.
But it is the ONLY thing that displays.
OnInspectorGUI
doesn’t draw anything.
DrawDefaultInspector
doesn’t draw anything either.
I tried both of them.
I was expecting to see the transform, attached scripts, material etc.
Can a gameobject’s full inspector be drawn in a custom window ?
If so, how ?