I spent several hours tracking this down last night, and found the solution this morning. This is very strange, but I have this code:
float angle = Vector3.Angle(curNode.edgeDir,curNode.bisector);
Which works fine in 2018.1, but returns an incorrect “angle” value in 2018.2 In 2018.1 it returns 90, in 2018.2 it returns 0, which breaks the rest of the code in that function.
There are no other changes in my codebase.
When I add this function:
public static float Anglen(Vector3 from, Vector3 to)
{
return Mathf.Acos(Mathf.Clamp(Vector3.Dot(from.normalized, to.normalized), -1f, 1f)) * 57.29578f;
}
and change the above line to use this new function:
float angle = Anglen(curNode.edgeDir,curNode.bisector);
The code works as expected in 2018.2 as well.
I am guessing this must be a bug? Why would a simple function like Vector3.angle be different between versions?
EDIT: I have just received a notification that 2018.2.8f1 has been released. I don’t know if this fixes the issue, I have been using 2018.2.7f1.