void StartNewSpline() { Debug.Log("new"); SplineController sc = GetComponent <SplineController>(); GetComponent <TestMove>().FreeSpline(sc.SplineRoot); sc.SplineRoot = GetComponent <TestMove>().GetSpline(); sc.Start(); }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.P)) { SplineController sc = GetComponent <SplineController>(); sc.SplineRoot = GameObject.Find("Spline2"); sc.Start(); } }