File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -381,10 +381,12 @@ void MainFrameDerived::OpenProject(const long& index){
381381 wxMessageBox (" Cannot open project at " + p.path .string () + " because it could not be found." , " Cannot Open Project" , wxOK | wxICON_ERROR);
382382 return ;
383383 }
384-
385- for (const auto & path : installPaths) {
386- auto editorPath = path / p.version / executable;
387384
385+ for (const auto & editor : editors) {
386+ if (editor.name .find (p.version ) == std::string::npos)
387+ continue ;
388+
389+ auto editorPath = editor.executablePath ();
388390 // check that the unity editor exists at that location
389391 if (filesystem::exists (editorPath)) {
390392
@@ -410,6 +412,7 @@ void MainFrameDerived::OpenProject(const long& index){
410412 }
411413#endif
412414 }
415+
413416 // prompt the user to choose a new editor because we couldn't locate one
414417 wxCommandEvent evt;
415418 MainFrameDerived::OnOpenWith (evt);
You can’t perform that action at this time.
0 commit comments