Skip to content

Commit 250ac3c

Browse files
just some whitespace changes
1 parent 13a3db3 commit 250ac3c

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

UnitySetup/UnitySetup.psm1

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ class UnitySetupInstance {
7777
[UnitySetupComponent]::Documentation = , [io.path]::Combine("$Path", "Editor\Data\Documentation");
7878
[UnitySetupComponent]::StandardAssets = , [io.path]::Combine("$Path", "Editor\Standard Assets");
7979
[UnitySetupComponent]::Windows_IL2CPP = , [io.path]::Combine("$playbackEnginePath", "windowsstandalonesupport\Variations\win32_development_il2cpp");
80-
[UnitySetupComponent]::UWP = [io.path]::Combine("$playbackEnginePath", "MetroSupport\Templates\UWP_.NET_D3D"),
81-
[io.path]::Combine("$playbackEnginePath", "MetroSupport\Templates\UWP_D3D");
80+
[UnitySetupComponent]::UWP = [io.path]::Combine("$playbackEnginePath", "MetroSupport\Templates\UWP_.NET_D3D"),
81+
[io.path]::Combine("$playbackEnginePath", "MetroSupport\Templates\UWP_D3D");
8282
[UnitySetupComponent]::UWP_IL2CPP = , [io.path]::Combine("$playbackEnginePath", "MetroSupport\Templates\UWP_IL2CPP_D3D");
8383
[UnitySetupComponent]::Linux = , [io.path]::Combine("$playbackEnginePath", "LinuxStandaloneSupport");
8484
[UnitySetupComponent]::Mac = , [io.path]::Combine("$playbackEnginePath", "MacStandaloneSupport");
@@ -103,12 +103,12 @@ class UnitySetupInstance {
103103
}
104104

105105
# Common playback engines:
106-
$componentTests[[UnitySetupComponent]::Android] = , [io.path]::Combine("$playbackEnginePath", "AndroidPlayer");
107-
$componentTests[[UnitySetupComponent]::iOS] = , [io.path]::Combine("$playbackEnginePath", "iOSSupport");
108-
$componentTests[[UnitySetupComponent]::AppleTV] = , [io.path]::Combine("$playbackEnginePath", "AppleTVSupport");
106+
$componentTests[[UnitySetupComponent]::Android] = , [io.path]::Combine("$playbackEnginePath", "AndroidPlayer");
107+
$componentTests[[UnitySetupComponent]::iOS] = , [io.path]::Combine("$playbackEnginePath", "iOSSupport");
108+
$componentTests[[UnitySetupComponent]::AppleTV] = , [io.path]::Combine("$playbackEnginePath", "AppleTVSupport");
109109
$componentTests[[UnitySetupComponent]::Facebook] = , [io.path]::Combine("$playbackEnginePath", "Facebook");
110-
$componentTests[[UnitySetupComponent]::Vuforia] = , [io.path]::Combine("$playbackEnginePath", "VuforiaSupport");
111-
$componentTests[[UnitySetupComponent]::WebGL] = , [io.path]::Combine("$playbackEnginePath", "WebGLSupport");
110+
$componentTests[[UnitySetupComponent]::Vuforia] = , [io.path]::Combine("$playbackEnginePath", "VuforiaSupport");
111+
$componentTests[[UnitySetupComponent]::WebGL] = , [io.path]::Combine("$playbackEnginePath", "WebGLSupport");
112112

113113
$componentTests.Keys | ForEach-Object {
114114
foreach ( $test in $componentTests[$_] ) {
@@ -368,8 +368,8 @@ function Find-UnitySetupInstaller {
368368
$patchPage = "https://unity3d.com/unity/qa/patch-releases?version=$($Version.Major).$($Version.Minor)"
369369
$searchPages += $patchPage
370370

371-
$webResult = Invoke-WebRequest $patchPage -UseBasicParsing
372-
$searchPages += $webResult.Links | Where-Object {
371+
$webResult = Invoke-WebRequest $patchPage -UseBasicParsing
372+
$searchPages += $webResult.Links | Where-Object {
373373
$_.href -match "\/unity\/qa\/patch-releases\?version=$($Version.Major)\.$($Version.Minor)&page=(\d+)" -and $Matches[1] -gt 1
374374
} | ForEach-Object { "https://unity3d.com$($_.href)" }
375375
}
@@ -712,14 +712,14 @@ function Request-UnitySetupInstaller {
712712

713713
Unregister-Event -SourceIdentifier "$installerFileName-Completed" -Force
714714
Unregister-Event -SourceIdentifier "$installerFileName-Changed" -Force
715-
715+
716716
$data.webClient.Dispose()
717717
$data.webClient = $null
718718

719719
# Re-writes the last modified time for ensuring downloads are cached properly.
720720
$downloadedFile = Get-Item $data.destination
721721
$downloadedFile.LastWriteTime = $data.lastModified
722-
722+
723723
$resource = New-Object UnitySetupResource -Property @{
724724
'ComponentType' = $data.componentType
725725
'Path' = $data.destination
@@ -731,16 +731,16 @@ function Request-UnitySetupInstaller {
731731
$elapsedTime = (Get-Date) - $data.startTime
732732

733733
$progress = [int](($data.receivedBytes / [double]$data.totalBytes) * 100)
734-
734+
735735
$averageSpeed = $data.receivedBytes / $elapsedTime.TotalSeconds
736736
$secondsRemaining = ($data.totalBytes - $data.receivedBytes) / $averageSpeed
737-
737+
738738
if ([double]::IsInfinity($secondsRemaining)) {
739739
$averageSpeed = 0
740740
# -1 for Write-Progress prevents seconds remaining from showing.
741741
$secondsRemaining = -1
742742
}
743-
743+
744744
$downloadSpeed = Format-BitsPerSecond -Bytes $data.receivedBytes -Seconds $elapsedTime.TotalSeconds
745745

746746
Write-Progress -Activity "Downloading $installerFileName | $downloadSpeed" `
@@ -811,14 +811,14 @@ function Install-UnitySetupPackage {
811811
}
812812
}
813813
}
814-
814+
815815
Write-Verbose "$(Get-Date): Installing $($Package.ComponentType) to $Destination."
816816
$process = Start-Process @startProcessArgs
817817
if ( $process ) {
818818
if ( $process.ExitCode -ne 0) {
819819
Write-Error "$(Get-Date): Failed with exit code: $($process.ExitCode)"
820820
}
821-
else {
821+
else {
822822
Write-Verbose "$(Get-Date): Succeeded."
823823
}
824824
}
@@ -922,7 +922,7 @@ function Install-UnitySetupInstance {
922922
$installPath += [io.path]::DirectorySeparatorChar
923923
}
924924

925-
# Creating sparse bundle to host installing Unity in other locations
925+
# Creating sparse bundle to host installing Unity in other locations
926926
$unitySetupBundlePath = [io.path]::Combine($Cache, "UnitySetup.sparsebundle")
927927
if (-not (Test-Path $unitySetupBundlePath)) {
928928
Write-Verbose "Creating new sparse bundle disk image for installation."
@@ -1415,7 +1415,7 @@ function Start-UnityEditor {
14151415
if ( -not $PSBoundParameters.ContainsKey('BatchMode') ) { $BatchMode = $true }
14161416
if ( -not $PSBoundParameters.ContainsKey('Quit') ) { $Quit = $true }
14171417
}
1418-
if ( $AcceptAPIUpdate ) {
1418+
if ( $AcceptAPIUpdate ) {
14191419
$sharedArgs += '-accept-apiupdate'
14201420
if ( -not $PSBoundParameters.ContainsKey('BatchMode')) { $BatchMode = $true }
14211421
}
@@ -1478,7 +1478,7 @@ function Start-UnityEditor {
14781478
([OperatingSystem]::Windows) {
14791479
$editor = Get-ChildItem "$($setupInstance.Path)" -Filter 'Unity.exe' -Recurse |
14801480
Select-Object -First 1 -ExpandProperty FullName
1481-
1481+
14821482
if ([string]::IsNullOrEmpty($editor)) {
14831483
Write-Error "Could not find Unity.exe under setup instance path: $($setupInstance.Path)"
14841484
continue
@@ -1489,7 +1489,7 @@ function Start-UnityEditor {
14891489
}
14901490
([OperatingSystem]::Mac) {
14911491
$editor = [io.path]::Combine("$($setupInstance.Path)", "Unity.app/Contents/MacOS/Unity")
1492-
1492+
14931493
if ([string]::IsNullOrEmpty($editor)) {
14941494
Write-Error "Could not find Unity app under setup instance path: $($setupInstance.Path)"
14951495
continue
@@ -1513,7 +1513,7 @@ function Start-UnityEditor {
15131513
if ( $Credential ) { $unityArgs += '-password', $Credential.GetNetworkCredential().Password }
15141514
if ( $Serial ) { $unityArgs += '-serial', [System.Net.NetworkCredential]::new($null, $Serial).Password }
15151515

1516-
# We've experienced issues with Start-Process -Wait and redirecting
1516+
# We've experienced issues with Start-Process -Wait and redirecting
15171517
# output so we're using the Process class directly now.
15181518
$process = New-Object System.Diagnostics.Process
15191519
$process.StartInfo.Filename = $editor
@@ -1523,17 +1523,17 @@ function Start-UnityEditor {
15231523
$process.StartInfo.UseShellExecute = $false
15241524
$process.StartInfo.CreateNoWindow = $true
15251525
$process.StartInfo.WorkingDirectory = $PWD
1526-
$process.StartInfo.WindowStyle = [System.Diagnostics.ProcessWindowStyle]::Hidden
1526+
$process.StartInfo.WindowStyle = [System.Diagnostics.ProcessWindowStyle]::Hidden
15271527
$process.Start() | Out-Null
1528-
1528+
15291529
if ( $Wait ) {
15301530
$process.WaitForExit()
15311531

15321532
if ( $LogFile -and (Test-Path $LogFile -Type Leaf) ) {
15331533
# Note that Unity sometimes returns a success ExitCode despite the presence of errors, but we want
15341534
# to make sure that we flag such errors.
15351535
Write-UnityErrors $LogFile
1536-
1536+
15371537
Write-Verbose "Writing $LogFile to Information stream Tagged as 'Logs'"
15381538
Get-Content $LogFile | ForEach-Object { Write-Information -MessageData $_ -Tags 'Logs' }
15391539
}
@@ -1617,7 +1617,7 @@ function Get-UnityLicense {
16171617
# The first four bytes look like a count so skip that to pull out the serial string
16181618
$licenseSerial = [String]::new($devBytes[4..($devBytes.Length - 1)])
16191619
if ( $Serial -and [System.Net.NetworkCredential]::new($null, $Serial).Password -ne $licenseSerial ) { continue; }
1620-
1620+
16211621
$license = $doc.root.License
16221622
[PSCustomObject]@{
16231623
'LicenseVersion' = $license.LicenseVersion.Value
@@ -1641,11 +1641,11 @@ function Get-UnityLicense {
16411641

16421642
$alias = Get-Alias -Name $_.Name -ErrorAction 'SilentlyContinue'
16431643
if ( -not $alias ) {
1644-
Write-Verbose "Creating new alias $($_.Name) for $($_.Value)"
1645-
New-Alias @_
1644+
Write-Verbose "Creating new alias $($_.Name) for $($_.Value)"
1645+
New-Alias @_
16461646
}
16471647
elseif ( $alias.ModuleName -eq 'UnitySetup' ) {
1648-
Write-Verbose "Setting alias $($_.Name) to $($_.Value)"
1648+
Write-Verbose "Setting alias $($_.Name) to $($_.Value)"
16491649
Set-Alias @_
16501650
}
16511651
else {

0 commit comments

Comments
 (0)