public override void OnInspectorGUI() { base.DrawDefaultInspector(); CreateMap CM = target as CreateMap; if (GUILayout.Button("CreateMap")) { CM.GenerateMap(); } if (GUILayout.Button("DestroyMap")) { CM.DestroyMap(); } }