Does setting a default value for period count as a solution?

This was my first idea, though I suspect it isn’t strictly in the spirit of the challenge:

float cycles = Time.time / (period <= Mathf.Epsilon? 2f : period);

Of course, this comes with the drawback that the block could not be fully stopped simply by setting the period value, but it is one other possible way of handling the issue.

Thanks for sharing your solution! :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms