Search Unity

Visual Studio not properly configured?

Discussion in 'Getting Started' started by kjelle392, Nov 19, 2017.

  1. kjelle392

    kjelle392

    Joined:
    Mar 7, 2013
    Posts:
    5
    I'm very new to Unity, and tries to follow Brackey's fantastic RPG-tutorial.

    I wonder if something is wrong with my Visual Studio setup, because I can't get VS to do the magic Brackey can.

    For instance - when he writes:
    Code (csharp):
    1.  
    2. [...]
    3. using UnityEngine.AI;
    4. [...]
    5. NavMeshAgent agent;
    6.  
    the component name "NavMeshAgent" changes color, and then he get the methods listed each time he uses "agent." in the code.

    Another example:
    Code (csharp):
    1.  
    2. Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    3. RaycastHit hit;
    4.  
    writing "hit." later won't show me the methods, and all code is just standard color (except some keywords).

    The scripts works all right though. I'm using a fresh installation of the latest version on a Windows-box.

    How can I get VS to behave? :)
     
  2. kjelle392

    kjelle392

    Joined:
    Mar 7, 2013
    Posts:
    5
    Guess I found the answer myself.

    This has to be a bug, but if I select the file in VS' Solution Explorer on the right, switch the file's property "Build Action" from "Compile" to "None" - and then back again to "Compile", everything works!