02-18-2021, 01:12 PM
(This post was last modified: 02-18-2021, 01:13 PM by PretzelStudios.)
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
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