Unity did not crash. Your while loop at line 17 is stuck in an infinite loop. The body of the loop doesn't change either the `XPos` or `i` variables, so the test you make never changes to `false`.
↧