Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Assigning "OnControlPointReached" and "OnEndReached" values during runtime?
#3
I know this is an old post but if anyone is still having the issue I solved this problem using the following:


private SplineController _splineController;
    [SerializeField] private GameObject _yourGameObject;

private void Awake() {
        _splineController = _yourGameObject.GetComponent<SplineController>();
    }

private void Start() {
        _splineController.OnControlPointReached.AddListenerOnce(EndReached);
    }

private void EndReached(CurvySplineMoveEventArgs e) {
        Debug.Log("End Reached");
       //put your code here
    }


Hope that helps Smile
Reply


Messages In This Thread
RE: Assigning "OnControlPointReached" and "OnEndReached" values during runtime? - by PretzelStudios - 02-18-2021, 01:12 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Avoiding runtime GC allocations on control point position change Ell223 8 18 02-24-2024, 10:43 AM
Last Post: _Aka_
Wink Modifying Splines at Runtime artsung 1 7 01-30-2024, 09:40 AM
Last Post: _Aka_
  Is it possible to create a road texture at runtime? artsung 1 4 01-30-2024, 09:30 AM
Last Post: _Aka_
  Cant Generate Meshes At Runtime alms94 5 22 01-26-2024, 11:27 AM
Last Post: _Aka_

Forum Jump: