private void SwitchBranch(string branch) { if (EditorUtility.DisplayDialog(ConfirmSwitchTitle, String.Format(ConfirmSwitchMessage, branch), ConfirmSwitchOK, ConfirmSwitchCancel)) { Repository.SwitchBranch(branch) .FinallyInUI((success, e) => { if (success) { UsageTracker.IncrementBranchesViewButtonCheckoutLocalBranch(); Redraw(); AssetDatabase.Refresh(); } else { EditorUtility.DisplayDialog(Localization.SwitchBranchTitle, String.Format(Localization.SwitchBranchFailedDescription, branch), Localization.Ok); } }).Start(); } }