public static bool CustomDrawer_ButtonExportConfig(Rect rect, string label, SimpleSidearms instance, Color background) { drawBackground(rect, background); Rect buttonRect = new Rect(rect); buttonRect.position = new Vector2(buttonRect.position.x + buttonRect.width - 200, buttonRect.position.y); buttonRect.width = 200; Color keptColor = GUI.color; GUI.color = Color.cyan; bool clicked = Widgets.ButtonText(buttonRect, label.Translate()); if (clicked) { UnsafeUtilities.ExportConfigViaReflection(instance); } GUI.color = keptColor; return(false); }