Netcode doesn't exist in the namespace 'UnityEngine'

I’m a newbie. I’m stuck with this error since yesterday. I’m getting error with this specific line of code. Help!

using UnityEngine.Netcode;//Here is the line of code where I get error.

Here’s the error:
Assets\NetworkManagerUI.cs(5,19): error CS0234: The type or namespace name ‘Netcode’ does not exist in the namespace ‘UnityEngine’ (are you missing an assembly reference?)

I’ve tried removing and reinstall the “Netcode for GameObjects”. I add multiplayer tools in package manager. Tried upgrading the version of my unity editor too. Lastly i tried reimport but I can’t find reimport in external tools in preferences. Anyone know how to fix this?

using Unity.Netcode; // not: UnityEngine

Packages provided by Unity use the Unity namespace.
Built-in APIs use UnityEngine respectively UnityEditor namespaces.

1 Like