Path Layers
Make sure to first read the Path Layers section in the Overview page.
Creating a new Path Layer asset
In order to create a new PathLayer asset, you need to:
- Right-click in the Content Browser
- Select "Errant Paths" -> "Errant Path Layer"
- Name the asset. We use "EPLR_" prefix for PathLayers, but feel free to use your own naming convention.
- Fill in the "Display Name", set the "Color", and adjust the "Spawn Order" in the newly created asset.
- We recommend setting the optional "Note" property as well, with a description of what that PathLayer should be used for.
"Spawn Order" controls the order in which Path components spawn. Components with lower "Spawn Order" spawn first. For example, an electrical pole should spawn before a CableComponent, allowing the cable to attach correctly to the pole.
Optimally, a parent component should have a lower or equal "Spawn Order" than its child components. If that's not true and child components spawn before their parents, temporary instances of the parents are created, increasing generation time slightly. In practice, "Spawn Order" often aligns with the natural hierarchy of road components.
Regardless of the "Spawn Order", the generation will always work correctly and rendering performance of the Path stays the same.
Assigning Path Layers to components and PathTemplates
PathLayers can be assigned directly to components within a PathTemplate, allowing for complex Path configurations using a minimal number of PathTemplates.
We require all components in the PathTemplate to have a PathLayer assigned to them. Having certain components without the PathLayer assigned will cause a BP compilation error.
Overriding PathLayers for a PathTemplate
Alternatively, you may not assign PathLayers to any of the components and instead override the PathLayer for the entire PathTemplate in the PathDescription asset.
All components must have a PathLayer assigned or overridden for a PathDescription to compile successfully.
Ignoring Path Layers
To skip spawning specific PathLayers in a Path, add them to the "Ignored Path Layers" list in the PathDescription asset. This is useful, for example, to omit trash and debris from spawning in the road.
Renaming Path Layers
PathLayer assets can be safely renamed, without breaking the PathTemplates/PathDescriptions that use them.
Upgrading to Errant Paths 1.0
Before Errant Paths 1.0 release, PathLayers were plain names listed in the PathDescription asset and could only be assigned to PathTemplates. Starting with Errant Paths 1.0, they are assets and can be assigned to individual components. See this page for instructions regarding the asset migration process.