Path Creator

Path Creator is a tool for quickly creating paths between traffic nodes.

How To Use

  1. Open the tool from the Unity toolbar:

    Spirit604/CityEditor/Window/Path Creator

    _images/OpenExample.png
  2. Select the source traffic node and target traffic node in the scene (example).

  3. Customize new path settings.

  4. Select the desired Connection Type (connection settings).

  5. Customize Source & Target connection side, so that the path is positioned correctly (example) (connection settings).

  6. Click the Create button.

  7. Customize the created paths.

Settings

Node Settings

_images/NodeSettings.png
Source Traffic Node : source traffic node.
Target Traffic Node : target traffic node.
U turn : enable it if you plan to create a U-turn.

Path Settings

_images/PathSettings1.png
Select after create : the path will be selected in the inspector after creation.

Visual Settings

_images/VisualSettings.png
Show preview dotted line: on/off connection line in the scene.
  • Show path direction : on/off arrows of the connection line.

  • Arrow spacing : arrow spacing.

Show forbidden path : on/off display of forbidden connection line.
Show overriden path : on/off display of overriden connection line (if disabled preview color will be taken).
Font color : font color of traffic node index gizmos.
Preview connection color : preview connection line color.
Forbidden connection color : forbidden connection line color.
Overriden connection color : overriden connection line color.

Connection Settings

_images/ConnectionSettings.png
Connection type:
  • Single connect : only 1 path is created.

  • One direction connect : paths of all lanes are created for one side.

  • Two direction connect : paths of all lanes are created for two sides [New].

Override type:
  • Not allowed : path will be created only if the path has not been created before.

  • Allowed : path will be overwritten if created earlier.

Auto detect side : when selecting nodes, the selected sides will be automatically detected.
Auto switch type : automatically switch connection type after selecting nodes depending on connection sides.
Connect same side : target side will be the same as source side.
Source node side :
Target node side :
Single connect setting :
  • Connect same index : target index will be the same as source index.

  • Source lane index : source lane index.

  • Target lane index : connected lane index.

Buttons

_images/Buttons1.png
Swap nodes : swap source and target node.
Create : create available paths.

Examples

_images/Example1.png

Connection available example (allow override path enabled, show overriden path disabled).

_images/Example2.png

Connection available example (allow override path enabled, show overriden path enabled, paths already created for these nodes & overwritable).

_images/Example3.png

Connection forbidden example (path already created for these nodes & can’t be overwritten).