Sprite Shape set corner mode

Hi, I want to set the corner mode of my sprite shape to stretch but, there is only 1 function to do this
shapeController.spline.SetCorner(int index, bool value);
and it activate the corner mode but put it on automatic, how can i modify it to stretch mode ?

Thank you !

Hmm, i found this on Unity documentation
“Please note that scripting support for this new Corner mode will be available in a later release.”

SetCornerMode exists but is internal, so until it becomes public, here is the reflection code you can use:

// Reflection for spline.SetCornerMode(pointIndex, Corner.Stretched);
var setCornerModeMethod = typeof(Spline).GetMethod("SetCornerMode",
    System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
setCornerModeMethod.Invoke(spline, new object[] { pointIndex, Corner.Stretched });

Note: this will also set corner flag appropriately (true if Corner Mode is not Disabled, false else).