UnityTimer icon indicating copy to clipboard operation
UnityTimer copied to clipboard

callback exception catch.

Open dghn opened this issue 5 years ago • 1 comments

Exception on any callback causes timer not to complete. It can't proceed to done state, and that timer can't be removed from timers list and update loop of Timer is spammed with exceptions that is caught by Unity run-time which is good but still a big issue.

Exception could be logged to the user or thrown upwards, left to the maintainer.

dghn avatar Mar 06 '20 08:03 dghn

try/catches are expensive in Unity (or any game engine) and even more brutal when called in the Update() method, therefore at least in production code highly recommended to avoid them at all costs. Unfortunately I don't have any quick suggestions or time to dig in (busy with my own mess) but maybe someone else can chime in.

glenneroo avatar Jan 02 '21 23:01 glenneroo