Quantcast
Channel: Questions in topic: "crash"
Viewing all articles
Browse latest Browse all 2383

Can I use Invoke to protect from an endless loop I am debugging?

$
0
0
Every now and then I will get Unity stuck in a loop, and have to end task and reload everything. It occurred to me just now that I could use Invoke to exit a potential loop after a few seconds, when debugging a squirrely area of code. Will this tactic protect me, generally, or can I hang it so bad it can't think straight? Is it a bad habit? (Should I be doing something else, such as learning more about try/catch, perhaps? - do they represent all the safety I need?)

Viewing all articles
Browse latest Browse all 2383

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>