Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

callback exception catch.#8

Open
dghn wants to merge 1 commit intoakbiggs:masterakbiggs/UnityTimer:masterfrom
dghn:timer-callback-exception-fixdghn/UnityTimer:timer-callback-exception-fixCopy head branch name to clipboard
Open

callback exception catch.#8
dghn wants to merge 1 commit intoakbiggs:masterakbiggs/UnityTimer:masterfrom
dghn:timer-callback-exception-fixdghn/UnityTimer:timer-callback-exception-fixCopy head branch name to clipboard

Conversation

@dghn
Copy link

@dghn dghn commented Mar 6, 2020

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.

@glenneroo
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments

Close sidebar
Morty Proxy This is a proxified and sanitized view of the page, visit original site.