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. Dismiss Notice

Solved: Visual studio has no auto completion?

Discussion in 'Scripting' started by GTHell, Jun 19, 2016.

  1. GTHell

    GTHell

    Joined:
    Jan 5, 2016
    Posts:
    256
    What can possibly goes wrong? I install everything along with new 5.4.5 update that include vstool.
    I can get VS to work with Unity but it won't have auto completion.

    Solved:

    Install .Net 3.5 sp1 or just install every .Net version because Unity using old .Net
     
    Last edited: Jun 20, 2016
  2. Suddoha

    Suddoha

    Joined:
    Nov 9, 2013
    Posts:
    2,824
    Have you already checked the settings?

    I think it's Tools > Options > Text Editor > C#.
    There has to be a checkbox for auto-completion.
    If it's checked, you should get a list while typing. If one is highlighted, you can use Enter (auto-completes) or Space Bar (auto-completes with a space/blank at the end).
     
  3. JoshuaMcKenzie

    JoshuaMcKenzie

    Joined:
    Jun 20, 2015
    Posts:
    897
    also make sure the code actually complies. sometimes if you have typos earlier in a file, code completion will simply not work

    For example, missing a semi-colon, closing bracket, or closing parenthesis. A quick way that helps me find where these typos are is (in Monodevelop) select some or all of the code in a file and press alt+up/alt+down which shifts the code up/down and re-formats the selection. the re-format sets each line's indent based on the assumed indent level which quickly points out where those missing characters are (as everything pass the typo will be over indented).

    In visual studio the hotkey for formatting code should be (ctrl+e,ctrl+d) for entire document. and (ctrl+e,ctrl+f) to format the current selection
     
    Suddoha likes this.
  4. Severos

    Severos

    Joined:
    Oct 2, 2015
    Posts:
    181
    Sometimes VS auto complete doesn't work (regardless of Unity), but when I restart it, it works normally, guess sometimes things can go wrong while loading project.
     
  5. GTHell

    GTHell

    Joined:
    Jan 5, 2016
    Posts:
    256
    I've tried what you said. It doesn't work. I custom install this and Untick everything because it take so long time.

    On my other computer. It work fine. Maybe I forgot to install some important module. well let me waste another 2 hour reinstalling Visual Studio and see where will it get me to.
     
  6. GTHell

    GTHell

    Joined:
    Jan 5, 2016
    Posts:
    256
    Solve:

    Install .Net 3.5 sp1 because Unity is asking for it.