Quantcast
Channel: Answers for "Can the Unity editor break out of an infinite loop in a script?"
Viewing all articles
Browse latest Browse all 39

Answer by GilesDMiddleton

$
0
0
There is a way to save your scene before killing the app. If you can get a breakpoint in your infinite loop, by attaching the debugger, type this in the immediate window.. EditorApplication.SaveScene("Assets/MyNewScene.unity"); Then press play again. Hit your breakpoint again. Type it again to make sure, then look in your assets folder. Then to quit the editor, type EditorApplication.Exit(0); I tried this with a FixedUpdate() containing while (true) { int x=0; x=x+1; Debug.Log ( x.ToString() ); }

Viewing all articles
Browse latest Browse all 39

Trending Articles



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