Hi there,
I have run into this prob a few times so I thought I’d see if someone here can clear it up for me,
Is it possible to use while in a function?
I had a point in my script where I wanted the function to wait until the player’s vehicle had stopped before it continued.
Something like this
while (vehicleScript.vehicleSpeed > 1){
print ("Speed"+vehicleScript.vehicleSpeed);
}
This made unity crash and, I have a feeling functions can’t do this due to the way they run, is that right? If so is there another way to get a function to pause like this?
Thanks
Pete