The type or namespace name ‘UnityTransport’ could not be found (are you missing a using directive or an assembly reference?)
in my script i wrote:
public bool IsRelayEnabled => Transport != null && Transport.Protocol == UnityTransport.ProtocolType.RelayUnityTransport;
Please Help!!
What version of Netcode for GameObjects are you using?
If it’s the newly-released 1.0.0-pre.7, you should add a using directive for the namespace Unity.Netcode.Transports.UTP
, since that’s where the UnityTransport
component has been moved. (You should also make sure package com.unity.netcode.adapter.utp
is uninstalled, although that should be taken care of automatically.)
If you’re using 1.0.0-pre.6 or below, make sure package com.unity.netcode.adapter.utp
is installed. Or update to 1.0.0-pre.7, which would actually be my recommendation here.
7 Likes