简体   繁体   中英

How to setup Visual Studio for existing Unity project?

I have cloned an existing Unity project from git on a new machine, and the source does not include *.sln or *.csproj .

I have also downloaded Visual Studio from Unity Hub, but the editor doesn't work with Unity:

  1. VS doesn't recognize Unity components
  2. Unity doesn't update VS project (new scripts not recognized in VS)

在此输入图像描述

I have selected VS as external tool for Unity, as shown here:

在此输入图像描述

I also installed anything VS suggests (Mono, and a few plugins, etc). What's still missing?

The VS version is 7.7.4 and Unity is 2019.02

Problem fixed when I happened to re-open the project inside Unity:

Asset > Open C# Project

References:

  1. Autocompletion not working in Visual studio
  2. https://answers.unity.com/questions/1451377/autocomplete-in-visual-studio-wont-work-please-hel.html

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