private void ShowPopup(Rect rect) { AssetDatabase.SaveAssets(); this.ReserveRight(39f, ref rect); this.ReserveBottom(5f, ref rect); if (CollabToolbarWindow.ShowCenteredAtPosition(rect)) { GUIUtility.ExitGUI(); } }
void ShowPopup(Rect rect) { // window should be centered on the button ReserveRight(kCollabButtonWidth / 2, ref rect); ReserveBottom(5, ref rect); // calculate screen rect before saving assets since it might open the AssetSaveDialog window var screenRect = GUIUtility.GUIToScreenRect(rect); // save all the assets AssetDatabase.SaveAssets(); if (CollabToolbarWindow.ShowCenteredAtPosition(screenRect)) { GUIUtility.ExitGUI(); } }