07-15-2016, 07:07 PM
I have the following
But the function is never called.
Any idea what is causing this?
I also tried by passing a member function but non is working.
Code:
dc = GetComponent<DebtCollector>();
if (dc != null)
{
if (sc != null && !sc.Spline.Closed)
{
sc.OnEndReached.AddListener(e => {
if (dc != null)
dc.Collect();
});
sc.OnEndReached.CheckForListeners();
}
}
But the function is never called.
Any idea what is causing this?
I also tried by passing a member function but non is working.