C# beginner coding issue

Hello !

First of all, you should use the code insert tool in the toolbox. Like this, you can past your code and make it far easier to read ! ( Using code tags properly )

As for your issue, I past your code into a little script and I didn’t experienced any issue.
I saw no problem in your Update() loop so far… I believe the problem might be hidden somewhere else…
Do you have another script on your object or are you sure you had the focus on your game panel while in play mode ?

1 Like