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