Unity Scripts edited in Visual studio don't provide autocomplete

前端 未结 26 1958
半阙折子戏
半阙折子戏 2020-11-22 10:02

When I want to edit C# Unity scripts, they open in Visual Studio. It is supposed to provide auto complete for all Unity related code, but it doesn\'t work.

Here you c

26条回答
  •  猫巷女王i
    2020-11-22 10:19

    Try this,

    1. In Unity Editor Go to Menu, Click on Edit -> Preferences -> External Tools -> External Script Editor. Set it to Visual Studio (your installed version of VS).

    2. Now in Menubar go to Edit -> Project Settings -> Player Settings -> Other Settings -> Under Configuration -> Check API Compatibility Level -> Change it to your installed .Net version. In my case I set it to .Net 4.x

    Now if Visual Studio is running already go to Visual Studio, it will ask to reload project. Reload the project. Check if it works, if not close Visual Studio. Now Open cs file from Unity Editor, and now it should work.

提交回复
热议问题