Road Constructor

Where To Find

  1. Buy & download, import the following asset plugin:

Getting Started

  1. Add the ROAD_CONSTRUCTOR scripting define to the Player Settings of the project.

  2. Open demo scene.

  3. Create City base, in the Unity toolbar open:

    Spirit604/CityEditor/Create/City Base

  4. Open each prefab in the prefab stage.

    _images/rc10.png
  5. Then, add the RC_TrafficLightConverter component & press the Create button.

    _images/rc11.png
  6. Activate TrafficLightHybridService.

    _images/rc13.png

    Hub/Controllers/Road/TrafficLightHybridService

  7. Select scene type depending on your needs.

Editor Scene

  1. Open RoadConstructorDemoEditor scene.

  2. Select Road Constructor on the scene.

  3. Set collider type to Non Convex if you plan to use vehicles with physics [optional step]

    _images/rc5.png
  4. Select the layer of the ground collider according to your vehicle’s ground raycasting. [optional step]

    _images/rc8.png
  5. Tick on Add Traffic comp.

    _images/rc6.png
  6. Select Road Builder Editor on the scene

  7. Press Initialize button.

    _images/rc1.png
  8. Place your roads according to your needs.

    _images/rc14.png

    Example.

  9. Then, press Register scene objects, Add Traffic Components, Create Waypoints buttons.

    _images/rc2.png
  10. Create a new gameobject & add RC_EditorSceneGenerator component.

    _images/rc3.png
  11. Adjust any necessary settings in the Inspector.

  12. Press Generate button.

    _images/rc15.png

    Result example.

  13. Select Hub object in the scene

  14. Untick Move lights option.

    _images/rc9.png
  15. In the Hub, generate the subscene.

  16. If you need to regenerate roads, select Hub, press Move back button, then regenerate roads in RC_EditorSceneGenerator & press Generate again in the Hub.

  17. The next step is to set up Vehicles

Vehicles

Hybrid Mono

Physics simulation vehicles run on standart Monobehaviour scripts.

  1. Set the World simulation type to Hybrid mono in the General settings config.

  2. Find the HybridTrafficCarMonoSkinBase Arcade prefab & set the ground layer to match the ground collider layer in the Road Constructor.

  3. Create Hybrid Mono vehicles.

No Physics

Vehicles without physics.

  1. Set the World simulation type to DOTS in the General settings config.

  2. Set the Physics simulation type to No physics in the General settings config.

  3. Set Entity type to Pure entity no physics in the Traffic Settings

  4. Create No physics vehicles.

Custom Physics

Vehicles with DOTS physics (works only in the Editor scene).

  1. Set the World simulation type to DOTS in the General settings config.

  2. Set the Physics simulation type to Unity physics in the General settings config.

  3. Set Entity type to Pure custom physics in the Traffic Settings

  4. Select Hub object in the scene

  5. Enable the Copy Physics Shapes option to clone surfaces from the main scene to the sub-scene after each sub-scene regeneration.

  6. Add layer according to your ground layer in the Road Constructor (read more about physics shape transferring)

    _images/rc12.png
  7. Create Custom physics vehicles.