Lines 8 and 14, “Start” and “Update” were formerly light yellow, but now they are blue.
Line 17, “Translate” and “;” are light yellow, and the numbers appear to be light green.
I did not put custom colors on any text.
Using Visual Studio Community 2022.
Using Unity 2022.3.13f1.
The pickup is not moving. Any help would be appreciated.
Text color has zero influence over how the code works or whether it works at all. It’s just Visual Studio highlighting it to make it more readable for you.
Based on your description, this should definitely work. Double check that the script is added to the pickup, check if there are any errors popping up in the console.
Just as a follow-up to this post, in lesson 1.2.1, at 3:50 in the video, when the trainer used the mouse to drag the script and drop it onto the truck, the checkmark to enable the script was already there. It appeared to be enabled by default.
Yes, scripts are enabled by default. You must have disabled it by accident.
They can also disable themselves when there’s an exception raised, but that’s unlikely in your case since the script is really simple. A weirder possibility is animation clips animating the value of the checkbox at runtime, but this is even less likely.