Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
viavr-editor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIA-VR
viavr-editor
Commits
4db2c2f8
Commit
4db2c2f8
authored
1 month ago
by
Samuel Truman
Browse files
Options
Downloads
Patches
Plain Diff
Start Unity once after Unity Hub setup
parent
21ce306f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
res/checkInstallAll.ps1
+13
-8
13 additions, 8 deletions
res/checkInstallAll.ps1
with
13 additions
and
8 deletions
res/checkInstallAll.ps1
+
13
−
8
View file @
4db2c2f8
...
...
@@ -331,22 +331,26 @@ Install-Software -Name "Unity" -InstallScript {
}
### Unity License ###
Write-Host
"Starting and stopping Unity once. You don't have to do anything."
-ForegroundColor
Yellow
Start-Process
-FilePath
"C:\Program Files\Unity 2021.3.31f1\Editor\Unity.exe"
Start-Sleep
-Seconds
20
# Wait a few seconds (allows Unity to initialize)
$process
=
Get-Process
|
Where-Object
{
$_
.
Path
-eq
"C:\Program Files\Unity 2021.3.31f1\Editor\Unity.exe"
}
if
(
$process
)
{
Stop-Process
-Id
$process
.
Id
-Force
}
Write-Host
""
Write-Host
"For VIA-VR to work you need a Unity account and a valid license. I'll now start the Unity Hub."
-ForegroundColor
Yellow
Write-Host
"Please sign in or create an account."
-ForegroundColor
Yellow
Write-Host
"Once logged in, go to preferences -> licenses and make sure you have a valid license (e.g. a free personal license)."
-ForegroundColor
Yellow
Write-Host
"Should anything go wrong please continue with the installation. You can manually start the Unity Hub, login, and get a license later."
$null
=
$Host
.
UI
.
RawUI
.
FlushInputBuffer
()
$null
=
$Host
.
UI
.
RawUI
.
FlushInputBuffer
()
# prevents previous repeated enter presses to skip pause
Pause
Start-Process
-RedirectStandardOutput
"null"
-FilePath
"C:\Program Files\Unity Hub\Unity Hub.exe"
Write-Host
""
Write-Host
"Please press enter and continue once you have a valid Unity license."
$null
=
$Host
.
UI
.
RawUI
.
FlushInputBuffer
()
# prevents previous repeated enter presses to skip pause
Pause
Write-Host
"Starting and stopping Unity once. You don't have to do anything."
-ForegroundColor
Yellow
Start-Process
-FilePath
"C:\Program Files\Unity 2021.3.31f1\Editor\Unity.exe"
Start-Sleep
-Seconds
20
# Wait a few seconds (allows Unity to initialize)
$process
=
Get-Process
|
Where-Object
{
$_
.
Path
-eq
"C:\Program Files\Unity 2021.3.31f1\Editor\Unity.exe"
}
if
(
$process
)
{
Stop-Process
-Id
$process
.
Id
-Force
}
### COMPLETION ###
if
(
$failedInstalls
.
Count
-gt
0
)
{
...
...
@@ -359,4 +363,5 @@ Write-Host "Installation complete. Press Enter to exit." -ForegroundColor Green
Write-Log
"Installation process completed."
Stop-Transcript
$null
=
$Host
.
UI
.
RawUI
.
FlushInputBuffer
()
# prevents previous repeated enter presses to skip pause
Pause
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment