Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question VS doesn't auto complete a lot

Discussion in 'Getting Started' started by Cosmology27, Apr 19, 2021.

  1. Cosmology27

    Cosmology27

    Joined:
    Jul 11, 2019
    Posts:
    39
    So I just got a new computer, and installed Unity and Visual Studio and what not. When writing code, it will autocomplete sometimes, but most the time it doesn't. It's also making some words colored, but many other words it doesn't color.
    I'm watching Brackeys and tons of the stuff that's colored or autocompletes for him doesn't for me. For example, "LayerMask" stays white for me, and typing "Time" doesn't autocomplete, and when I type "Time.d" it doesn't show up "Time.deltaTime".
    I'm quite a noob, so I absolutely love the autocomplete feature, and on my old machine it did it all the time, so what do I need to do to make it autocomplete all the time again?
    Thanks for the help!
     
  2. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    First, close Visual Studio.

    Then in Unity, navigate to:
    Edit > Preferences > External Tools > External Script Editor.

    Make sure Visual Studio is set as the editor, then click on "Generate all .csproj files".

    Launch Visual Studio again and it should be working now.
     
    Cosmology27 likes this.
  3. Pelikaapeli

    Pelikaapeli

    Joined:
    Apr 20, 2021
    Posts:
    5
    Hello, i just had the same problem. Where do i find the "Edit" from "Edit > Preferences > External Tools > External Script Editor."?
     
  4. Cosmology27

    Cosmology27

    Joined:
    Jul 11, 2019
    Posts:
    39
    When you have Unity open, "edit" is at the top where you see "file", "edit", "assets", etc.
     
  5. Pelikaapeli

    Pelikaapeli

    Joined:
    Apr 20, 2021
    Posts:
    5
    I am also using "Microsoft Visual Studio" instead of "Visual Studio Code". Does it matter?
     
  6. Cosmology27

    Cosmology27

    Joined:
    Jul 11, 2019
    Posts:
    39
    Thanks so much! I must have originally done that like two years ago, while watching a YouTube video to get me started or something. No way I would have found it again, you're a life saver thanks!
     
    Vryken likes this.
  7. Pelikaapeli

    Pelikaapeli

    Joined:
    Apr 20, 2021
    Posts:
    5
    upload_2021-4-20_18-42-18.png
    I cant find it?
     
  8. Cosmology27

    Cosmology27

    Joined:
    Jul 11, 2019
    Posts:
    39
    That's because you're not in Unity, you're in the Unity Hub. You have to actually be in a project. Here's a screenshot.
     

    Attached Files:

  9. Pelikaapeli

    Pelikaapeli

    Joined:
    Apr 20, 2021
    Posts:
    5
    OH. Im so noob, thanks!!
     
  10. Pelikaapeli

    Pelikaapeli

    Joined:
    Apr 20, 2021
    Posts:
    5
    I got it working! Thank you both so much! Will be using these forums in the future for sure!