I am new and trying to follow a tutorial to make a game.
Besides, check whether the default configuration has been set(details here: Configure Unity to use Visual Studio).
Other document to refer to: Intellisense for Unity API Message.
CodePudding user response:
Is your class inheriting from MonoBehaviour? You should have this at the top where you declare your class
public class MyClass : MonoBehaviour