1

everytime I create a C# Script in Unity

it creates the file without creating a new project or adding the file to an already existing project.

Since the new created file is a blank cs, IntelliSense wont activate, which is really annoying.

I already tried creating a new C#-Project and pulling it into Unity, but projects that are created out of Unity do not inherit from MonoBehaviour. Also, the Start and Update methods arent created from the beginning.

I would love to have all my in Unity created C#-Scripts in a project.

derHugo
  • 83,094
  • 9
  • 75
  • 115
actopozipc
  • 93
  • 12
  • Possible duplicate of [Autocompletion not working in Visual studio](https://stackoverflow.com/questions/42597501/autocompletion-not-working-in-visual-studio) – Ruzihm Jun 13 '19 at 21:19

3 Answers3

3

Visual Studio Tools for Unity wasnt installed.

actopozipc
  • 93
  • 12
  • Hi actopozipc, so glad to hear that your issue is solved and please mark it as answer, that will help others to easier search it, thanks in advance. – Sara Liu - MSFT Jun 18 '19 at 03:31
0

I have Visual Studio Tools for Unity installed and sometimes I ran into this issue. One thing that I do, instead of double clicking the .cs file is this.Click on open C# project This will force Unity to create a project if one doesn't exist, after that when you create a new script, don't double click on it to open it. You have to open it in your visual studio project. Hope this helps.

elopez7
  • 41
  • 5
0

Go to Edit -> Preferences -> External Tools

  • Select Visual Studio as external script editor
  • Then click on regenerate project files
Dadkhah
  • 99
  • 4