Unity.Netcode missing namespace

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

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.

10 Likes

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.

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

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?

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