The text remains blue for the entire line of code, is this normal or have I missed something important to install? The code still works fine though, just wondering.
Hi Benjamin,
Where do you expect the text to become yellow? In Unity?
My apologies for not being clear here, so I am talking about directly in visual studio. When I type the following code “transform.Translate(XValue,YValue,ZValue);” the entire line of code remains in a blue color. In the video I noticed that the Translate part of the text in the code turns yellow - mine remains blue. This sorta thing would really help me keep stay organize and read the code much faster.
I provided an image example below, look at the very bottom of the image I attached.
Do you mean Visual Studio or Visual Studio Code?
Your syntax highlighting looks fine to me. See the very first line: Your class has got a different colour than the class it inherits from. If they had the same colour, that would have indicated an issue.
The ‘problem’ is very likely that you have a different color theme than our instructor. Test a few and keep the one you like best. The colours are a visual help for you, the programmer. They don’t have any functionality in the code itself.
No, there’s an issue. It appears the IDE is not recognising the Unity specific stuff. This is what it should look like
(yes, I typed it all out in my IDE)
Note MonoBehaviour
, SerializeField
, Input
and Time
are all highlighted in the same way as the class. Start
and Update
are also colored different because they are Unity messages instead of standard methods.
I’m not sure how to fix the issue, though. I have seen this happen to me before and restarting Unity and Visual Studio has solved it for me in the past
Edit
I also have this additional module installed in my Visual Studio
I’m not sure if the above is VS or VSCode, but for VS this may help