First, paste the official document link and open the official compiled document first.
https://www.lgsvlsimulator.com/docs/build-instructions/
Note 1. It is recommended that all files be installed in the program files of D drive.
Note 2. In order to reduce unknown compilation errors, you must proceed step by step, and proceed to the next step after the current step is complete.
The first step is to download unity hub, the management software of unity project.
The second step is to download the unity2019.1.10f1 version, which must be this version.
The third step is to download the recommended version of node.js 12.13.0
. The fourth step is to install the git tool, and then you can git clone simulator.
Note:
- Unity hub needs to apply for a license before it can be used. It can be activated manually. Follow the instructions step by step, not going into details.
- When installing unity, be sure to check Windows support and Linux support, otherwise it is important to uninstall and reinstall.
- The given git-lfs link does not work, just install another exe file, Git-2.25.1-64-bit.exe in the figure below, after installation, open the Git CMD shortcut, enter
git lfs install
, and see theGit LFS initialized.
proof Git It's already installed.
After the installation is over, the file will be cloned and compiled.
The fifth step is to clone the simulator. This step cannot be wrong, otherwise the unity opens the project without the simulator option, and the webUI cannot be compiled.
1. First create an empty folder named LG on the D drive.
2. After the Git CMD shortcut is opened, it will be the command line in the C:user\ju directory.
3. Enter the command line andcd..
return to the C:user directory. Enter the command line again andcd..
return to the command line in the C: root directory, enter the command line in the root directory ofD:
Disk D, and thencd \Program Files\LG
enter the command line in the LG directory.
4.git clone --single-branch https://github.com/lgsvl/simulator.git
Just input it and start cloning a simulator in the LG directory. When the uploading files are loaded, the cursor is still flashing, and it is not over yet. Be sure to clone it completely. Otherwise, an error will occur.
This picture is cloned to the default c drive. You must wait for the Filtering content to be cloned. It may take a long time or many times. In any case, you must get the complete cloned file.
Step 6, open the unity hub.
Step 7, click on the project, add, clone the complete simulator in the LG folder under the D drive.
Step 8, click Install, select unity2019.1.10f1 installed in D drive.
Step 9, click on the item to verify whether the simulator and unity versions match, there will be an exclamation mark if they do not match.
Step 10, double-click the simulator in the project, unity will run at this time, and it will be loaded after a while. If the simulator clone is incomplete, there may be no simulator option in the menu bar after loading, or an error will be reported.
Step 11, click the Git CMD shortcut to open the command line.
Step 12, cd into the webUI directory in the D disk simulator folder.
The 13th step, input npm install
, only run once, the interface is as follows.
Note: After npm install, a dist folder and a node_modules folder will be generated in the webUI directory. *
Step 14, then find simulator in the menu bar of the unity interface and click build webUI. If it is normal, it will enter the following interface.
Compilation is complete, the webUI appears in the console : build is completed as shown in the figure below.
If the compilation fails, the console will report a build error. At this time, delete the dist and node_modules under the webUI, and run it in the webUI directory
npm install
, and then build the webUI to see if there are any errors. If there is a compilation error, it may be a file I don't know if the clone is incomplete, or something else, it's best to succeed at once.
Step 15 is simple and clear, as follows.
Step 16, open the website.
https://www.lgsvlsimulator.com/docs/assets/
To add resources, first download these masters on GitHub and place them in the corresponding directories.
路径:simulator/Assets/External/Environments
- https://github.com/lgsvl/CubeTown
- https://github.com/lgsvl/SingleLaneRoad
- https://github.com/lgsvl/Shalun
- https://github.com/lgsvl/SanFrancisco
Path: simulator/Assets/External/Vehicles
- https://github.com/lgsvl/Jaguar2015XE
Note: Be sure to use git clone to download to the corresponding folder, not directly to the master, otherwise there will be errors.
After adding the designated master under environment and vehicle, the following interface is automatically recognized.
Check all, click build, wait for a while, the console will report an error, as follows.
Don't worry about the error, continue, click check in the simulator in the menu bar, there is also an error.
At this time, the AssetBundles folder will appear under the simulator folder.
There are corresponding files in the folder, as follows. End of step 16.
Step 17, Load LoaderScene as follows, click play, click OpenBrowser, and a login interface will pop up.
Login interface
Register and log in, the following cloud service interface appears
Step 18, select the target operating system
. Step 19, tick the build simulator
. Step 20, create a new folder named new under the LG folder on the D drive, and select the storage path as D:\Program Files\LG\new .
Step 21, tick
Step 22 of Development Build and click Build.
Screenshot of
compiling After compiling, the path D:\Program Files\LG\new will generate the following files.
Click on simulator.exe and the following figure appears.
Then have fun!