while (Input.GetKeyDown(KeyCode.W))
{
rb.AddRelativeForce(Vector3.up * thrust);
mainEngineThruster.Play();
}
Unity will freeze up indefinitely and I have to kill the process and restart Unity.
Not sure if this is a bug error or my stupidity Didn’t know where to post it.
The problem is that there is no error, the code functioning as it was written. It’s not really locked, it is just infinitely looping. Use while/until with care. Now you know what not to do.
There is some experiance and skill required in coding. The first lesson you learn is computers will do exactly what you tell them. If you tell them to lock up forever in an endless loop they will. Just be glad there is a fail safe built into your CPU that prevents it from melting.