public DynamicPathListSegments(PathList pathList, Allocator allocator)
 {
     this.points   = new DynamicArray <Vector2>(pathList.points, allocator);
     this.layouts  = new DynamicArray <PathLayout>(pathList.layouts, allocator);
     this.segments = new DynamicArray <Segment>(1, allocator);
     this.segments.Add(new Segment(0, pathList.layouts.Length));
 }
 public void Add(PathList pathList)
 {
     this.segments.Add(new Segment(this.layouts.Count, pathList.layouts.Length));
     this.points.Add(pathList.points);
     this.layouts.Add(pathList.layouts);
 }