Easy Roads

If Easy Roads was used to build the road network, waypoints could be extracted automatically, and there is no need to manually draw waypoints on the entire road network.

Requirements

Requires Easy Roads 3.3 to work. Version 3.3 is fully compatible with the current 3.2 version; nothing changes, just the waypoint information is added.

If you use the official release of 3.2 to create your environment, you'll have to upgrade it to 3.3 by importing the scripts from the demo project or downloading 3.3 from the official website.

The demo project is available for free on the Asset Store. Just log in with the account that owns Easy Roads, and it will be free to download:

assetstore.unity.com/packages/tools/terrain/easyroads3d-demo-project-105045

Version 3.3 is also available on the official website.

To download from the official website, you'll have to obtain a serial number for your account, and then you will be able to download the plugin. Follow the instructions from the website.

Setup

Please follow the Quick Start section first if you have not done it already to make sure the Mobile Traffic System is properly installed and working in your project.

Next, set your Grid and Layers as shown in the Prepare Scenesection.

Enable Easy Roads support:

Open the Settings Window go to External Tools -> Easy Roads Setup and click Enable Easy Roads Support

The scripts will start to compile at this step. If you get any errors inside your console make sure you are using version 3.3 of Easy Roads. see the Requirements.

Extract Waypoints

Open the Settings Window go to External Tools -> Easy Roads Setup

Select the intersection type you want to use: Traffic Lights Intersection or Priority Intersection

Set the Green Light Time and the Yellow Light Time. Each intersection will work according to the times set here.

If overtaking is needed check Link lanes for overtake.

Waypoint distance is the distance between two consecutive waypoints. If your city is full of curves, a lower distance works best. If it is mostly highway, a higher distance performs better. Try and see what the optimal value is for your road network.

Hit Extract Waypoints and the waypoints should be generated over your entire road network.

To activate traffic on your scene follow the Initializing Assetsection.

To configure the cars that spawn inside your scene check the Vehicle Pool section.

Check this video for more information:

Sometimes, when you extract the waypoints some errors like No lane data found on "Road Name" might appear.

This is because the waypoints were not enabled for that road type.

To fix it, select that road type in Easy Roads, go to Settings -> Lane Data add some lanes to your road, and update the scene instances.

Also, make sure Generate Lane data is enabled from AI Traffic.

For more details check this video:

Last updated