- Download and Install Unity Hub:
- Ubuntu: https://forum.unity.com/threads/unity-hub-v2-0-0-release.677485/
- Windows: https://unity3d.com/get-unity/download
- Download and Install Unity 2019.1.10f1:
- Ubuntu: https://beta.unity3d.com/download/f007ed779b7a/UnitySetup-2019.1.10f1
- Windows: https://unity3d.com/get-unity/download/archive
-
Download and Install Node.js
-
Make sure you have git-lfs installed before cloning this repository.
- Instructions for installation are here
- Verify installation with:
$ git lfs install > Git LFS initialized.
-
Clone simulator from GitHub:
git clone --single-branch https://github.com/lgsvl/simulator.git
-
Run Unity Hub
-
In the
Projects
tab, clickAdd
and select the folder that the Simulator was cloned to -
In the
Installs
tab, clickLocate
and choose theUnity
launcher in theUnity2019.1.10f1
folder -
In the
Projects
tab, verify that the Simulator is using Unity Version 2019.1.10f1 from the dropdown -
Double-click the name of the project to launch Unity Editor
-
Open a terminal window
cmd.exe
on WindowsTerminal
on Linux
- Navigate to the
WebUI
folder of the Simulator project
- Window ex.
C:\Users\XXX\Documents\Simulator\WebUI
- Linux ex.
/home/XXX/Projects/Simulator/WebUI
- Where
XXX
is the user profile
-
Run
npm install
to install dependencies, do this only once or if dependencies change inside packages.json file -
Run
Build WebUi...
inUnity
:Simulator
->Build WebUI...
-
Open
Build...
inUnity
:Simulator
->Build...
-
Check the Environments and Vehicles that should be generated as AssetBundles
- They will be located in a folder called
AssetBundles
in the folder selected as the build location - These may also be built separately from the Simulator. In this case they will be put into the
AssetBundles
folder of the project
-
(Optional) Click
Build
to only build the assetbundles. Load theLoaderScene.unity
and click the Play button at the top of the editor to start the simulator. -
Select the
Target OS
for the build -
Verify
Build Simulator
is checked for the Simulator to be built -
Select a folder that the simulator will be built in
-
(Optional) Check
Development Build
to create a Development Build -
Click
Build
Test Simulator top {: #test-simulator data-toc-label='Test Simulator'}
- Ubuntu - Install Vulkan userspace library
sudo apt-get install libvulkan1
-
Double-click the
Simulator.exe
that was built -
Select graphics options then press
Ok
-
Click
Open Browser
-
In the Maps tab,
Add new
map with the URL to an environment assetbundle
- ex.
C:\Users\XXX\Desktop\Simulator\AssetBundles\environment_borregasave
- In the Vehicles tab,
Add new
vehicle with the URL to a vehicle assetbundle
- ex.
C:\Users\XXX\Desktop\Simulator\AssetBundles\vehicle_jaguar2015xe
-
(Optional) Add a manual control "sensor" to the vehicle to enable driving
- Click the wrench icon next to the vehicle name
- In the text box insert
[{"type": "Manual Control", "name": "Manual Car Control"}]
-
In the Simulations tab,
Add new
simulation with the added map and vehicle -
Press the Play button
-
The Unity window should now show a vehicle in the built environment