I was building a prototype for a video game and wanted unity to instantiate a tiled set of objects.
The problem!
The obj Instantiate 100 of it self. Each object that is being instantiate Instantiates 100 objects of itself.
This causes and endless loop in the Start() function.
While unity is in the Start() functions the player cannot be stopped. (I lost my work as the scene was not saved.)
Pretty much, it is impossible for the compiler to always tell ahead of time what is an infinite loop and what is not. Also, there are cases where we actually do want something to loop infinitely, or as long as the program is running.
Youâll run into freezes from infinite loops a lot. =p
Ya, I hit Ctrl-S so often I find myself trying to save web pages in Chrome.
The nice thing about that blog post is if you donât know where the infinite loop is happening, then using a debugger can offer some hints as to whatâs going on.
I save every time i put at least 2 characters in a code, so much so, that i started doing it in visual studio, even after and before compiles which saves by itself, so triple save
Dont worry, if you go with the old schooled ctrl-alt-del, then you can force a program to stop in the processes tab (i thibj thats it in english) or yoh could wait for the blue screen of death, where your computer can look at you and ask âwhy have you done this to me?!â before completely shutting off.
have you ever been reading a book and found yourself doing a âctrl+fâ, or while writing in a notebook doing a âctrl+sâ with your left hand reflexively?