(Custom Editor) How to draw part of the default inspector.

So I know that you can use DrawDefaultInspector(); to draw the original inspector in UnityEditor, but I only want to draw part of it. Is this possible?

Yes it sure is, you can grab each variable with the code listed bellow. This example code grabs a Colour field.

using UnityEngine;
using UnityEditor;
using System.Collections;

[CustomEditor (typeof (//Insert Connected Script//))]
public class Sample : Editor {
public override void OnInspectorGUI() {
//Insert Connected Script// script = (//Insert Connected Script//)target;
script.variablename = EditorGUILayout.ColorField("Fill Color", script.variablename); // Grabs color field//
}
}

Hope this is the answer you are looking for :slight_smile: