Hi, I am the beginner of Unity software. Just start to learn the tutorial materials of “Rolling a ball”. I am trying to copy those code to my unity. But as you can see from the “PlayerController” in Unity, it reminds me there are errors somewhere in the scripts. To be honest, I am not familiar with C# language so much. Is there anybody who can tell me what might be the possible root cause to this problems. And what is strange to me is that in the scripts, the color of the third sentence beginning with “using …” is not exactly same as those two above. It’s a lilttle lighter. Who knows what’s the wrong with this scripts?
Many thanks for your answers.
First, if you are really new on this world, i recommend to spend first, 2-3 hours ina basic C# scripitng tutorial (so many in youtube), before you commence doing a Unity things. You will need it.
Then, i strongly recommend you change your Scripting program ti Microsoft visual studio (so many tutorials on how to download, install and link with Unity.
Then continue with this.
png 1 is grey because it isn;'t being used giving you the notation that it can be removed as it is redundant. This i’m guessing is the Unity player controller script you are looking at. Using at the top for C# is to have visible the namespace to another code so you can reference it in your code.
png 4 means you have an error in one of your codes so unity cannot compile them correctly to use them. There must be 0 errors in the console for you to be able to add scripts to a scene or to press play in the editor.