Create / Spawn SplineComponents depending on OSM data


I am totally new to game development and the unreal engine. Eventually I need some help. I want to create a road in an open world environment, based on real world maps. Up to now I can read the data, but I am not sure how to visualize it. I thought I can do like this:

  • Create a new actor class in C++ (ASplineRoad)

  • Add a FString-Property to get a path to the actual osm-xml-file.

  • On ‘PostEditChangeProperty’, i will get a new path to a file, that will be set in the UE-Editor.

  • For each road, spawn a USplineComponent.

  • Add all points of the road to the spline.

  • The Blueprint, that based on ASplineRoad, spawns meshes along the splines.


  1. Is this the right approach, or is there a better way?
  2. I am not quite sure with components, how do I spawn a USplineComponent. All I could find here are blueprint examples.

Thanks in advance