@@ -14,6 +14,7 @@ if ([String]::IsNullOrEmpty($projectPath)) {
14
14
}
15
15
16
16
$projectPath = (Get-Item $versionFilePath ).Directory.Parent.FullName
17
+ $projectPath = $projectPath -replace ' \\' , ' /'
17
18
Write-Host " Unity project path: `" $projectPath `" "
18
19
" UNITY_PROJECT_PATH=$projectPath " >> $env: GITHUB_ENV
19
20
}
@@ -34,16 +35,15 @@ if (-not ([String]::IsNullOrEmpty($unityVersion))) {
34
35
}
35
36
36
37
if ($IsWindows ) {
37
- $hubPath = " C:\ Program Files\ Unity Hub\ Unity Hub.exe"
38
- $editorRootPath = " C:\ Program Files\ Unity\ Hub\ Editor\ "
39
- $editorFileEx = " \ Editor\ Unity.exe"
38
+ $hubPath = " C:/ Program Files/ Unity Hub/ Unity Hub.exe"
39
+ $editorRootPath = " C:/ Program Files/ Unity/ Hub/ Editor/ "
40
+ $editorFileEx = " / Editor/ Unity.exe"
40
41
41
42
if ([string ]::IsNullOrEmpty($modulesList )) {
42
43
$modules = @ (' windows-il2cpp' , ' universal-windows-platform' , ' android' , ' ios' )
43
44
}
44
45
45
- # "Unity Hub.exe" -- --headless help
46
- # . 'C:\Program Files\Unity Hub\Unity Hub.exe' -- --headless help
46
+ # . 'C:/Program Files/Unity Hub/Unity Hub.exe' -- --headless help
47
47
function Invoke-UnityHub {
48
48
$argList = (@ (' --' , ' --headless' ) + $args.Split (" " ))
49
49
$p = Start-Process - NoNewWindow - PassThru - Wait - FilePath " $hubPath " - ArgumentList $argList
@@ -58,7 +58,6 @@ if ($IsWindows) {
58
58
$modules = @ (' mac-il2cpp' , ' ios' , ' android' )
59
59
}
60
60
61
- # /Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless help
62
61
# . "/Applications/Unity Hub.app/Contents/MacOS/Unity Hub" -- --headless help
63
62
function Invoke-UnityHub {
64
63
$argList = (@ (' --' , ' --headless' ) + $args.Split (" " ))
@@ -74,7 +73,6 @@ if ($IsWindows) {
74
73
$modules = @ (' linux-il2cpp' , ' android' , ' ios' )
75
74
}
76
75
77
- # /UnityHub.AppImage --headless help
78
76
# xvfb-run --auto-servernum "$HOME/Unity Hub/UnityHub.AppImage" --headless help
79
77
function Invoke-UnityHub {
80
78
$argsList = $args.Split (" " )
@@ -244,7 +242,7 @@ if (-not (Test-Path -Path $editorPath)) {
244
242
exit 1
245
243
}
246
244
247
- $modulesPath = ' {0}{1}{2} modules.json' -f $editorRootPath , $UnityVersion , [ IO.Path ]::DirectorySeparatorChar
245
+ $modulesPath = ' {0}{1}/ modules.json' -f $editorRootPath , $UnityVersion
248
246
249
247
if (-not (Test-Path - Path $modulesPath )) {
250
248
$editorPath = " {0}{1}" -f $editorRootPath , $unityVersion
@@ -271,6 +269,7 @@ $envEditorPath = $env:UNITY_EDITOR_PATH
271
269
272
270
if ([String ]::IsNullOrEmpty($envEditorPath )) {
273
271
Write-Host " "
272
+ $editorPath = $editorPath -replace ' \\' , ' /'
274
273
" UNITY_EDITOR_PATH=$editorPath " >> $env: GITHUB_ENV
275
274
Write-Host " UnityEditor path set to: $editorPath "
276
275
}
0 commit comments