public override void OnInspectorGUI() { DrawDefaultInspector(); UILayout myScript = (UILayout)target; if (GUILayout.Button("DoLayout")) { myScript.DoLayout(); } }