C# delivery driver

Hi there

So I’ve just started doing the c# course and the first one is delivery driver.

At the star it is showing how to rotate the object and the code they used was transform.rotate but when I tried to put it in Visual Studios it wasn’t working.

So I’m just wondering if there is anything I’m doing wrong or if the coding has changed?

Cheers Isaac

Hi,

If a script does not work, I usually check the following:

  • Did I save my script?
  • Are the Unity methods in my scripts spelt correctly?
  • Is my script attached to the correct game object?
  • Did I press the Play button?

And if I answered all questions with “yes”, I check the code inside the methods. If I cannot spot any issues, I use a Debug.Log to check if I’m getting the expected messages and values in the console during runtime.

Give it a try, and remember you can also look at the lecture code changes via the link in the Resources of each lecture. :slight_smile:


See also:

Yeah but the problem is my visual studios says that it doesn’t exist and I checked the resources and it’s saying that it does exist.

What does not exist? Does the filename match the class name inside the file? For example, is the Test class inside the Test.cs file? Make sure there is no space in the classname or filename.

Privacy & Terms