06-27-2017, 07:42 PM
Hi!
I make a costume SplineController for my game and when I run the game inside Unity than work perfectly. But, after a build, CurvySpline.DistanceToSegment(float) return null because the spline has 0 segment. Any ideas?!
Thx
Sébastien Marcil
I make a costume SplineController for my game and when I run the game inside Unity than work perfectly. But, after a build, CurvySpline.DistanceToSegment(float) return null because the spline has 0 segment. Any ideas?!
Thx
Sébastien Marcil
Code:
void setSegment()
{
CurvySplineSegment segment = _waySpline.DistanceToSegment(_splineDistance);
if (segment != _segment || _targetSpeedModified)
{
_segment = _waySpline.DistanceToSegment(_splineDistance);
_targetSpeed = _segment.GetComponent<SegmentController>().getSpeedBySegment(
_cornerEntry,
_cornerExit,
_topSpeed);
_targetSpeedModified = false;
}
}