private void Awake() { if (spline == null) { spline = GetComponent <SplineMonoBehaviour>(); } meshFilter = GetComponent <MeshFilter>(); }
public SplineFollower Setup( SplineMonoBehaviour spline, SplineFollowBehaviour followBehaviour ) { this.spline = spline; this.followBehaviour = followBehaviour; interpolateAmount = 0f; backAndForthDirection = 1f; enabled = true; return(this); }