PolyLine Round Joins via Script

Avatar
  • updated
  • Fixed

When creating a PolyLine via script the Joins setting doesn't seem to be taken into account until I move some point in the Editor or change the Joins setting to something else and back to Round in the editor. When setting it to Round via script it still remains sharp.


This is my code:

```

Shapes.Polyline spl = this.gameObject.AddComponent<Shapes.Polyline>(); 

spl.BlendMode = Shapes.ShapesBlendMode.Transparent; 

spl.ScaleMode = Shapes.ScaleMode.Uniform;
spl.ThicknessSpace = Shapes.ThicknessSpace.Meters;
spl.Closed = false;
spl.Geometry = Shapes.PolylineGeometry.Flat2D; 

spl.Joins = Shapes.PolylineJoins.Round; 

spl.points.Clear();

// Add points

spl.AddPoint(Vector3.zero); 

spl.AddPoint(Vector3.one); 

spl.AddPoint(new Vector3(2.0f, 0.0f, 0.0f)); 

spl.meshOutOfDate = true;

```

Is this a bug or am I missing something?

Reporting a bug? please specify Unity version:
2020.3.19f1
Reporting a bug? please specify Shapes version:
4.1.0
Reporting a bug? please specify Render Pipeline:
Built-in render pipeline
Pinned replies
Avatar
Freya Holmér creator
  • Answer
  • Fixed

fixed in 4.1.1

if you want to hotfix before the patch is released, go to Polyline.cs and add this on line 49:

Avatar
Freya Holmér creator
  • Answer
  • Fixed

fixed in 4.1.1

if you want to hotfix before the patch is released, go to Polyline.cs and add this on line 49: