@@ -42,10 +42,11 @@ public DefaultEnvironment(ICacheContainer cacheContainer)
4242 this . CacheContainer = cacheContainer ;
4343 }
4444
45- public void Initialize ( string unityVersion , NPath extensionInstallPath , NPath unityPath , NPath assetsPath )
45+ public void Initialize ( string unityVersion , NPath extensionInstallPath , NPath unityApplicationPath , NPath unityApplicationContentsPath , NPath assetsPath )
4646 {
4747 ExtensionInstallPath = extensionInstallPath ;
48- UnityApplication = unityPath ;
48+ UnityApplication = unityApplicationPath ;
49+ UnityApplicationContents = unityApplicationContentsPath ;
4950 UnityAssetsPath = assetsPath ;
5051 UnityProjectPath = assetsPath . Parent ;
5152 UnityVersion = unityVersion ;
@@ -109,6 +110,7 @@ public string GetEnvironmentVariable(string variable)
109110 public IFileSystem FileSystem { get { return NPath . FileSystem ; } set { NPath . FileSystem = value ; } }
110111 public string UnityVersion { get ; set ; }
111112 public NPath UnityApplication { get ; set ; }
113+ public NPath UnityApplicationContents { get ; set ; }
112114 public NPath UnityAssetsPath { get ; set ; }
113115 public NPath UnityProjectPath { get ; set ; }
114116 public NPath ExtensionInstallPath { get ; set ; }
@@ -140,9 +142,8 @@ public NPath NodeJsExecutablePath
140142 {
141143 if ( ! nodeJsExecutablePath . IsInitialized )
142144 {
143- nodeJsExecutablePath = IsWindows
144- ? UnityApplication . Parent . Combine ( "Data" , "Tools" , "nodejs" , "node.exe" )
145- : UnityApplication . Combine ( "Contents" , "Tools" , "nodejs" , "node" ) ;
145+ nodeJsExecutablePath =
146+ UnityApplicationContents . Combine ( "Tools" , "nodejs" , "node" + ExecutableExtension ) ;
146147 }
147148
148149 return nodeJsExecutablePath ;
@@ -207,7 +208,7 @@ public static bool OnMac
207208 }
208209 set { onMac = value ; }
209210 }
210- public string ExecutableExtension { get { return IsWindows ? ".exe" : null ; } }
211+ public string ExecutableExtension { get { return IsWindows ? ".exe" : string . Empty ; } }
211212 protected static ILogging Logger { get ; } = LogHelper . GetLogger < DefaultEnvironment > ( ) ;
212213 }
213214}
0 commit comments