Skip to main content

Labels

Path Labels and Spawn Conditions

image

The PathLabels (called Labels in short) are used to mark/tag certain parts of a Path (ex: turns) and then conditionally spawn components or PathTemplates in such marked areas. They can be used to mark all kinds of things - ex: sharp turn, downhill, slippery road, wet road, forest region, dirty, bridge, tunnel, cliff, speed limit.

Labels can be placed procedurally or manually. ProceduralLabels are blueprints with the IsFulfilled function you overwrite to provide your custom condition. Within that function, you can access information about the currently processed Path and spline point. Based on that data, the function decides whether a Label should be placed there.

ProceduralLabels can also be modified/painted by hand. For example, a ProceduralLabel "Barrier" can be extended manually to make the barrier longer. Or a barrier may be added in a certain area, independently of the procedural logic.

Labels that have no procedural logic are called ManualLabels. Such Labels don't overwrite the IsFulfilled function. They need to be painted manually on each Path.

The video below shows the process of creating a simple ProceduralLabel that detects sharp turns.

To see the Label in action, assign it to a component in a Path's PathTemplate and lastly update the Path.

note

For a Label to show in UI, it needs to be used as a SpawnCondition by the selected Path. It means that at least one of the components from the Path's PathTemplate needs to use that Label in its SpawnCondition.

Nesting Path Labels

ProceduralLabels have the capability to utilize other Labels, both manual or procedural. To nest a Label, follow these steps:

  • Open the IsFulfilled function.
  • Call the IsLabelFulfilled and choose the desired Label to be used.
note

Other examples of available functions to access other Label: IsLabelStarting, IsLabelEnding, IsLabelNearby...

note

When nesting Labels, it is important to be cautious of circular dependencies. If it occurs, a compilation error will be displayed and the Label will be ignored in the Path generation.

Inheritance of Labels

Another way to utilize other Labels is to derive from them. To do that, follow these steps:

  • Right-click the Label you want derive from.
  • Select Create Child Blueprint Class
  • Or right-click the content browser to open the context menu.
  • Go to Errant Paths, select the Path Label, and choose the class to derive from.

Manual editions of the Path Labels

Labels can be manually edited in the Label Painting tool. To interact with a Label, follow these actions:

  • Select a Label in the UI or in the viewport.
  • Press the Left Mouse Button (LMB) to add the Label at the cursor position.
  • Press Left-Ctrl + LMB to remove the Label at the cursor position.
  • Press Left-Shift + LMB to restore the Label at the cursor position."
note

During the generation of a Path, we make efforts to preserve any manual edits made by the user.