Skip to content

Commit

Permalink
fix unity project template for linux (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
van800 committed Dec 21, 2017
1 parent c8b7857 commit 71d2f30
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ public override RdProjectTemplateContent CreateContent(DotNetProjectTemplateExpa
if (string.IsNullOrEmpty(home))
break;

var unityDir = new DirectoryInfo(home).GetDirectories("Unity*").FirstOrDefault();
if (unityDir==null)
var path = new DirectoryInfo(home).GetDirectories("Unity*").Select(unityDir=>Path.Combine(unityDir.FullName, @"Editor/Data/Managed/UnityEngine.dll")).FirstOrDefault(File.Exists);
if (path == null)
break;
defaultPath = Path.Combine(unityDir.FullName, @"Editor/Data/Managed/UnityEngine.dll");
defaultPath = path;
break;
default:
defaultPath = @"C:\Program Files\Unity\Editor\Data\Managed\UnityEngine.dll";
Expand Down

0 comments on commit 71d2f30

Please # to comment.