I have just started programming but I can't follow this tutorial. In the tutorial, it shows that when they write start the start function apears.
When I type it in this happens
CodePudding user response:
you need to make sure that your script inherits the MonoBehaviour class. There are dozens of methods in MonoBehaviour such as Start(), Awake(), Update(), FixedUpdate(), OnGUI(), no matter which one you use. MonoBehaviour must be inherited. If the visual studio is not installed when you install unity, you need to install additional tools.
You can try as follows:
- edit->preference->external tools.
- Change the default to visual studio.
- After setting, the c# script will be opened as a unity project when it is opened through vs.Hope it helps you.