Ring with Start and End angle still renders a full ring

Avatar
  • updated
Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
4.3.1
Reporting a bug? please specify Render Pipeline:
Built-in render pipeline
Avatar
joe

Here's the code I am testing with.

GameObject ringObject = new GameObject("Dynamic Ring");

ringObject.transform.position = new Vector3(0, 0, 0);

Disc ringComponent = ringObject.AddComponent();

ringComponent.Type = DiscType.Ring;

ringComponent.Radius = 150f;

ringComponent.Color = Color.red;

ringComponent.Thickness = 10f;

ringComponent.ThicknessSpace = ThicknessSpace.Pixels;

ringComponent.AngRadiansStart = 0f;

ringComponent.AngRadiansEnd = Mathf.PI / 3;

Avatar
Freya Holmér creator

DiscType.Ring doesn't use angles - you'll need to use DiscType.Arc