Search Unity

you can help me!

Discussion in 'Getting Started' started by danhmary32, Jul 6, 2018.

  1. danhmary32

    danhmary32

    Joined:
    Jul 4, 2018
    Posts:
    2
    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. using UnityEngine.AI;
    3. [...]
    4. NavMeshAgent agent;
    the component name "NavMeshAgent" changes color, and then he get the methods listed each time he uses "agent." in the code.
     
  2. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    Make sure you are using the required namespaces:
    • using UnityEngine - Required for basically every script in Unity.
    • using UnityEngine.AI - Required for using NavMesh classes.
    Visual Studio should automatically add the UnityEngine namespace when you create a new script in Unity, but if it isn't, then your installation may not include game development with Unity.
    To check this, you'll need to launch the Visual Studio Installer. It's default location on your system should be:
    • C:\ProgramData\Microsoft\Windows\Start Menu\Programs
    If you're using Windows 10, you can just search for the application from the Start menu's search bar instead.

    When the installer launches, click on the button to modify your current installation:
    upload_2018-7-7_0-55-49.png

    Scroll down until you find "Game development with Unity". Check the box, then select the "Modify" button to modify your installation of Visual Studio:
    upload_2018-7-7_0-58-36.png