Please consider dedicating some time to purposefully learning the C# language. It is your ad-hoc approach to learning that is giving you so many problems.
Please bookmark this great resource for learning C# basics very quickly. It's also a terrific reference: http://rbwhitaker.wikidot.com/c-sharp-tutorials
A while statement will execute until the condition becomes false. Since your while statement block never changes the state, it creates an infinite loop, causing Unity to hang.
↧