public override void OnInspectorGUI() { DrawDefaultInspector(); GUILayout.Label(""); if (GUILayout.Button("Check neighbors")) { MapConfig palette = (MapConfig)serializedObject.targetObject; var neighbors = palette.Neighbors(); // TODO: } GUILayout.Label(""); }