Closed flip40 closed 8 years ago
Hm I remember this happening to me too but I didn't think much of it. I'll check on this tonight, might have been because I saved the scene before saving the script?
Might be a bug (or maybe a feature?) in the newer versions of Unity. Working as we expect when I move the declaration down to the Start function.
Not sure if this happened on your version Adrian, but my version seems to set speed to 0 instead of 100. Not sure if an oddity in versions or what. I moved the initialization of speed into the Start() function which seemed to fix it.
I haven't made a fix commit / PR yet since I wanted to leave it open for you to mess around with it if you wanted to. It SHOULD work how you did it (at least, as far as I know), but for some reason was just initializing as 0 instead. Maybe this will change when you update your Unity to the same version as mine? Dunno.