File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 14
14
RootModule = ' UnitySetup'
15
15
16
16
# Version number of this module.
17
- ModuleVersion = ' 5.3 '
17
+ ModuleVersion = ' 5.4 '
18
18
19
19
# Supported PSEditions
20
20
# CompatiblePSEditions = @()
Original file line number Diff line number Diff line change @@ -125,8 +125,18 @@ class UnityProjectInstance {
125
125
$projectSettingsFile = [io.path ]::Combine($path , " ProjectSettings\ProjectSettings.asset" )
126
126
if (! (Test-Path $projectSettingsFile )) { throw " Project is missing ProjectSettings.asset" }
127
127
128
- $prodName = ((Get-Content $projectSettingsFile - Raw | ConvertFrom-Yaml )[' playerSettings' ])[' productName' ]
129
- if (! $prodName ) { throw " ProjectSettings is missing productName" }
128
+ try {
129
+ $prodName = ((Get-Content $projectSettingsFile - Raw | ConvertFrom-Yaml )[' playerSettings' ])[' productName' ]
130
+ if (! $prodName ) { throw " ProjectSettings is missing productName" }
131
+ }
132
+ catch {
133
+ Write-Warning - Message " An Exception was caught!"
134
+ Write-Warning - Message " Exception Type: $ ( $_.Exception.GetType ().FullName) "
135
+ Write-Warning - Message " Exception Message: $ ( $_.Exception.Message ) "
136
+ }
137
+ finally {
138
+ $prodName = " "
139
+ }
130
140
131
141
$this.Path = $path
132
142
$this.Version = $fileVersion
You can’t perform that action at this time.
0 commit comments