Skip to content

Commit e713420

Browse files
committed
Fix launching for DownloadAssistant editors
1 parent 5360451 commit e713420

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

source/interface_derived.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,20 @@ void MainFrameDerived::OpenProject(const long& index){
340340

341341
return;
342342
}
343+
#if __APPLE__
344+
else if (filesystem::exists(path / executable)){
345+
// mac unlabeled version
346+
auto unlabeledPath = path/executable;
347+
char buffer[16];
348+
auto unlabeledPathInfo = path / "Unity.app" / "Contents" / "Info.plist";
349+
getCFBundleVersionFromPlist(unlabeledPathInfo.string().c_str(), buffer, sizeof(buffer));
350+
if (p.version == buffer){
351+
string cmd = "\"" + unlabeledPath.string() + "\" -projectpath \"" + p.path.string() + "\"";
352+
launch_process(cmd);
353+
return;
354+
}
355+
#endif
356+
}
343357
}
344358
//alert user
345359
wxMessageBox("The editor version " + p.version + " could not be found.\n\nCheck that it is installed, and that the folder where it has been installed is listed in the Editor Versions tab, under Install Search Paths.", "Unable to start Unity", wxOK | wxICON_ERROR);

0 commit comments

Comments
 (0)