Search Unity

Resolved Unity.Netcode missing namespace

Discussion in 'Netcode for GameObjects' started by littleman27, Dec 12, 2021.

  1. littleman27

    littleman27

    Joined:
    Feb 26, 2016
    Posts:
    6
    Hello, as the title suggests I'm having issues making Netcode functions because when I try to include "Unity.Netcode" my solution says that the namespace is missing. I looked for the namespace manually but I only see "Unity.Netcode.Editor" & "Unity.Netcode.Runtime"

    I have tried:
    - Reinstalling the Netcode package
    - Restarting my IDE, Unity, and my computer
    - Rebuilding the solution
    - Searching Google and the forums which led me to try the previous ideas

    I am using:
    - Unity 2020.3.23f1
    - Visual Studio Code & Visual Studio 2019
     
  2. ppudlik

    ppudlik

    Joined:
    Dec 11, 2020
    Posts:
    3
    I had the same problem today, what I did was to go into Preferences -> External Tools -> Enable Git Packages, then hit Regenerate Project Files. Worked for me.
     
  3. littleman27

    littleman27

    Joined:
    Feb 26, 2016
    Posts:
    6
    Thank you so much, between regenerating the project files and switching the external tools IDE back to Visual Studio instead of Visual Studio Code... it is now working.
     
  4. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    781
    It not work for me I had a same issue and tried the same steps as you But it still not work I don’t know why
     
  5. btslv

    btslv

    Joined:
    Aug 28, 2023
    Posts:
    1
    greetings. when I go to the external tools section of the preferences section, there is no git packages option. could it be the version of unity that I'm using?
     
  6. a_karpins

    a_karpins

    Joined:
    Mar 8, 2023
    Posts:
    9
    I did the instruction in the first reply, and it worked for me. Then I had to delete a package, and it caused some issues so I went back to regenerate the project files again, and now it's gone... I didn't change any other settings, the package I deleted was Netcode for gameobjects...so idk what happened

    Edit: Restarted unity and it's back now... so idk lol