Reset of a spline doesn't remove all the points
aprouzeau opened this issue · comments
Hi,
When I tried to reset the spline by using "Initialize" with a number of points lower than the previous spline, it didn't remove all the previous points and I ended up with too much point.
I had to manually remove of add the appropriate number of points:
if(spline.Count > newRendPoint.Length)
{
for(int i= prevLength-1; i>= newRendPoint.Length; i--)
{
spline.RemovePointAt(i);
}
}
else if(spline.Count < newRendPoint.Length)
{
for (int i = prevLength; i < newRendPoint.Length; i++)
{
spline.InsertNewPointAt(i);
}
}
Now the update is live on Asset Store, as well.