Instructions to build standalone executable

  1. Download and Install Unity Hub:

  2. Download and Install Unity 2019.1.10f1:

  3. Download and Install Node.js

    • Version 12.13.0 LTS is fine
  4. 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.
      
  5. Clone simulator from GitHub:

    git clone --single-branch https://github.com/lgsvl/simulator.git

  6. Run Unity Hub

  7. In the Projects tab, click Add and select the folder that the Simulator was cloned to

  8. In the Installs tab, click Locate and choose the Unity launcher in the Unity2019.1.10f1 folder

  9. In the Projects tab, verify that the Simulator is using Unity Version 2019.1.10f1 from the dropdown

  10. Double-click the name of the project to launch Unity Editor

  11. Open a terminal window

    • cmd.exe on Windows
    • Terminal on Linux
  12. 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
  13. Run npm install to install dependencies, do this only once or if dependencies change inside packages.json file

  14. Run Build WebUi... in Unity: Simulator -> Build WebUI...

  15. Open Build... in Unity: Simulator -> Build...

  16. 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 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
  17. (Optional) Click Build to only build the assetbundles. Load the LoaderScene.unity and click the Play button at the top of the editor to start the simulator.

  18. Select the Target OS for the build

  19. Verify Build Simulator is checked for the Simulator to be built

  20. Select a folder that the simulator will be built in

  21. (Optional) Check Development Build to create a Development Build

  22. Click Build

Test Simulator top#

  1. Ubuntu - Install Vulkan userspace library

    sudo apt-get install libvulkan1
    
  2. Double-click the Simulator.exe that was built

  3. Select graphics options then press Ok

  4. Click Open Browser

  5. In the Maps tab, Add new map with the URL to an environment assetbundle

  6. ex. C:\Users\XXX\Desktop\Simulator\AssetBundles\environment_borregasave

  7. In the Vehicles tab, Add new vehicle with the URL to a vehicle assetbundle

  8. ex. C:\Users\XXX\Desktop\Simulator\AssetBundles\vehicle_jaguar2015xe

  9. (Optional) Add a manual control "sensor" to the vehicle to enable driving

  10. Click the wrench icon next to the vehicle name
  11. In the text box insert [{"type": "Manual Control", "name": "Manual Car Control"}]

  12. In the Simulations tab, Add new simulation with the added map and vehicle

  13. Press the Play button

  14. The Unity window should now show a vehicle in the built environment