public override void OnInspectorGUI() { DrawDefaultInspector(); ProceduralMesh script = (ProceduralMesh)target; if (GUILayout.Button("Generate Mesh")) { script.MeshStuff(); } if (GUILayout.Button("Delete Mesh")) { script.DeleteMesh(); } }