Instructions to build standalone executable
When a terminal is mentioned, it refers to:
cmd.exe on Windows
Terminal on Ubuntu
-
Download and Install Unity Hub
- Ubuntu: You may need to allow the downloaded AppImage to be run as an executable
- Right-click the AppImage
- Select
Properties - Go to the
Permissionstab - Check
Allow executing file as program - Alternatively, in the terminal run
sudo chmod +x UnityHub.AppImage
- Ubuntu: You may need to allow the downloaded AppImage to be run as an executable
-
Download and Install Unity 2019.3.3f1:
- IMPORTANT include Mono support for both Windows and Linux when installing Unity
- (Optional) include support for Visual Studio for easier debugging
- Unity Download Archive
- Windows
- Click the
Unity Hubbutton to have Unity Hub handle the installation process
- Click the
- Ubuntu
- Right click the
Unity Hubbutton andCopy Link Address - In a terminal
PATH_TO_UNITY_HUB COPIED_LINK- The copied link will be in the form
unityhub://Unity-VERSION/XXXXXX(e.g.unityhub://2019.3.3f1/7ceaae5f7503)
- The copied link will be in the form
- Unity Hub will open and guide you through the installation of Unity Editor
- Right click the
- Verify installation
- Under the
Installstab ofUnity Hubthere should be the expected version shown. In the bottom-left corner of the version, there should be an icon of the other OS (e.g. on a Linux computer, the Windows logo will be shown)
- Under the
-
Download and Install Node.js
- Version 12.16.1 LTS is fine
- Windows
- Download and run the
.msi
- Download and run the
- Ubuntu
- The instructions are from the NodeJS Github
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -sudo apt-get install -y nodejs
- The instructions are from the NodeJS Github
- Verify installation
- Open a terminal and type
node --version v12.16.1should print out
- Open a terminal and type
-
Make sure you have git-lfs installed before cloning the Simulator repository.
- Instructions for installation are here
- Verify installation
- In a terminal enter
git lfs install > Git LFS initialized.should print out
- In a terminal enter
-
Clone simulator from GitHub
- Open a terminal and navigate to where you want the Simulator to be downloaded to
- e.g. If you want the Simulator in your
Documentsfolder, usecdin the terminal so that the input for the terminal is similar to/Documents$
- e.g. If you want the Simulator in your
git clone --single-branch https://github.com/lgsvl/simulator.git- Verify download
- The
git clonewill create aSimulatorfolder - Open a File Explorer and navigate to where the
Simulatorfolder is - Navigate to
Simulator/Assets/Materials/EnvironmentMaterials/ - There should be a
EnvironmentDamageAlbedo.pngin this folder - Open the image, it should be a mostly grey square that looks like concrete
- If the image cannot be opend,
Git LFSwas not installed before cloning the repository- Install
Git LFSfollowing step 4 - In a terminal, navigate to the
Simulatorfolder so that the terminal is similar to/Simulator$ git lfs pull- Check the image again
- Install
- The
- Open a terminal and navigate to where you want the Simulator to be downloaded to
-
Run Unity Hub
-
In the
Projectstab, clickAddand select theSimulatorfolder that was created bygit clonein Step 5 -
In the
Projectstab, verify that the Simulator is using Unity Version 2019.3.3f1 from the dropdown -
Double-click the name of the project to launch Unity Editor
-
Open a terminal and navigate to the
WebUIfolder of the Simulator project- Window ex.
C:\Users\XXX\Documents\Simulator\WebUI - Linux ex.
/home/XXX/Projects/Simulator/WebUI
- Window ex.
-
In the terminal run
npm installto install dependencies, do this only once or if dependencies change inside packages.json file- The output will be similar to below
-
In Unity Editor run
Build WebUi...inUnity:Simulator->Build WebUI... -
Open
Build...inUnity:Simulator->Build... -
Check the Environments, Vehicles, and Sensors that should be generated as AssetBundles
- The
Simulatorrepository does not contain any Environments, Vehicles, or Sensors. They are separate repositories on GitHub - 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
Simulator/AssetBundlesfolder of the project
- The
-
(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
- Open
Unity Huband go to theInstallstab - Click the vertical 3-dots next to the Unity version of the Simulator
- Click
Add Modules - Check
Windows Build Support (Mono)orLinux Build Support (Mono) - Click
Done
- Open
- 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


