@@ -105,6 +105,12 @@ public static void OpenSelectedProjectWith()
105
105
}
106
106
}
107
107
108
+ public static void OpenSelectedProjectInTerminal ( )
109
+ {
110
+ if ( TryGetSelectedProject ( out var unityProject ) )
111
+ OsUtils . OpenInTerminal ( unityProject . path ) ;
112
+ }
113
+
108
114
public static void OnRemoveProjectFromListClicked ( )
109
115
{
110
116
UnityHubUtils . UnityProjects . RemoveAt ( GetUnityProjectSelectedIndex ( ) ) ;
@@ -277,7 +283,7 @@ public static void MoveSelectedProjectDown()
277
283
WrapSelection = true ,
278
284
SelectionMode = SelectionMode . AlwaysSelected | SelectionMode . Single ,
279
285
SelectedIndex = 0 ,
280
- } . AddOnSubmit ( OnUnityProjectListSubmitted ) . OnSelectionChanged ( UnityProjectSelectedIndexChanged )
286
+ } . OnSelectionChanged ( UnityProjectSelectedIndexChanged )
281
287
} ,
282
288
] ) ,
283
289
] )
@@ -553,6 +559,12 @@ public static MenuItem[] CreateProjectMenuItems(Func<UnityProject> unityProjectG
553
559
InputGesture = new ( Key . Enter , KeyModifiers . Alt ) ,
554
560
} . OnClick ( OpenSelectedProjectWith ) ,
555
561
new MenuItem
562
+ {
563
+ Header = "Open In Terminal" ,
564
+ HotKey = new ( Key . Enter , KeyModifiers . Alt | KeyModifiers . Shift ) ,
565
+ InputGesture = new ( Key . Enter , KeyModifiers . Alt | KeyModifiers . Shift ) ,
566
+ } . OnClick ( OpenSelectedProjectInTerminal ) ,
567
+ new MenuItem
556
568
{
557
569
Header = "_Reveal In File Explorer" ,
558
570
HotKey = new KeyGesture ( Key . F , KeyModifiers . Control ) ,
@@ -627,13 +639,6 @@ static Task<IEnumerable<object>> PopulateUnityProjectSearchAutoCompletion(string
627
639
}
628
640
}
629
641
630
- static void OnUnityProjectListSubmitted ( )
631
- {
632
- if ( ! IsAnyProjectSelected ( ) )
633
- return ;
634
- ( ( UnityProjectView ) s_unityProjectsParent . Items [ GetUnityProjectSelectedIndex ( ) ] ! ) . OpenProject ( ) ;
635
- }
636
-
637
642
static void RemoveSelectedUnitySearchPath ( Button button , RoutedEventArgs args )
638
643
{
639
644
var index = GetSelectedUnityInstallationSearchPathsIndex ( ) ;
@@ -707,6 +712,11 @@ static async void AddNewUnitySearchPath()
707
712
708
713
static bool TryGetSelectedProject ( out UnityProject unityProject )
709
714
{
715
+ if ( s_projectSearchBoxAutoComplete . SelectedItem is UnityProjectView view )
716
+ {
717
+ unityProject = view . unityProject ;
718
+ return true ;
719
+ }
710
720
var ind = GetUnityProjectSelectedIndex ( ) ;
711
721
if ( ind < 0 || ind >= UnityHubUtils . UnityProjects . Count )
712
722
{
0 commit comments