I already wrote a few task and I never used OnReset on any of my task and I don't encounter any problems so far. So my question is:
1. What is the purpose of OnReset()?
2. What happen if I don't use it on my tasks?
3. And is there a better way to reset the variables other than manually assigning it? I mean if I have a
, then I need to do
, what will happen if I mistakenly set it to a different float?
Thanks
1. What is the purpose of OnReset()?
2. What happen if I don't use it on my tasks?
3. And is there a better way to reset the variables other than manually assigning it? I mean if I have a
Code:
public SharedFloat speed = 5f;
Code:
public override void OnReset()
{
speed = 5f;
}
Thanks