Instructions to build standalone executable
-
Download and Install Unity Hub:
-
Download and Install Unity 2019.1.10f1:
- IMPORTANT include support for both Windows and Linux when installing Unity
- (Optional) include support for Visual Studio for easier debugging
- Ubuntu: https://beta.unity3d.com/download/f007ed779b7a/UnitySetup-2019.1.10f1
- Windows: https://unity3d.com/get-unity/download/archive
-
Download and Install Node.js
- Version 12.13.0 LTS is fine
-
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
Projectstab, clickAddand select the folder that the Simulator was cloned to -
In the
Installstab, clickLocateand choose theUnitylauncher in theUnity2019.1.10f1folder -
In the
Projectstab, 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.exeon WindowsTerminalon Linux
-
Navigate to the
WebUIfolder of the Simulator project- Window ex.
C:\Users\XXX\Documents\Simulator\WebUI - Linux ex.
/home/XXX/Projects/Simulator/WebUI - Where
XXXis the user profile
- Window ex.
-
Run
npm installto 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
- See assets documentation for information on how to add Environments and Vehicles
- They will be located in a folder called
AssetBundlesin 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
AssetBundlesfolder of the project
-
(Optional) Click
Buildto only build the assetbundles. Load theLoaderScene.unityand click the Play button at the top of the editor to start the simulator. -
Select the
Target OSfor the build- This is only used when building the Simulator. Assetbundles are built for Linux and Windows automatically
-
Verify
Build Simulatoris checked for the Simulator to be built -
Select a folder that the simulator will be built in
-
(Optional) Check
Development Buildto create a Development Build -
Click
Build- NOTE You will get an error when building assetbundles if either Windows or Linux support is not installed in Unity
Test Simulator top#
-
Ubuntu - Install Vulkan userspace library
sudo apt-get install libvulkan1 -
Double-click the
Simulator.exethat was built -
Select graphics options then press
Ok -
Click
Open Browser -
In the Maps tab,
Add newmap with the URL to an environment assetbundle -
ex.
C:\Users\XXX\Desktop\Simulator\AssetBundles\environment_borregasave -
In the Vehicles tab,
Add newvehicle 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 newsimulation with the added map and vehicle -
Press the Play button
-
The Unity window should now show a vehicle in the built environment

