public override void OnInspectorGUI() { Calibrator myScript = (Calibrator)target; if (GUILayout.Button("Empty calibrator")) { myScript.CleanCalibrator(); } DrawDefaultInspector(); if (GUILayout.Button("Setup screen")) { //Undo.RecordObject(target, "test"); myScript.SetupCalibrator(); } }