简体   繁体   中英

Unity Intellisense with Visual Studio Code - Intellisense is mostly working except methods, why?

I've recently gotten back to game development and I would rather use vscode over visual studio for convenience.

Now Intellisense is mostly working, but methods won't show up. For example: 在此处输入图像描述

As you can see, intellisense seems to be working fine here, but when I try doing something like this (picture is taken from visual studio community): 在此处输入图像描述

It won't work:

在此处输入图像描述

It might be obvious but I cant pinpoint why it's not working. I tried googling it, but to no avail.

Any clues?

VS Code doesn't autocomplete methods like Update , Awake and OnTriggerEnter in MonoBehaviours because they are "magical" methods that are not virtual or abstract , but you can install an extension that contains those methods as snippets.
I tried it but didn't like it.
You may like it though: Unity Code Snippets .

Once I was stuck in the same situation. Installing extension

Unity Code Snippets

worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM