Getting Relay & NGO working together

I’m working on getting Netcode for GameObjects working with Relay in 2020.3.22f1. I’ve installed the Netcode, Relay, and Unity Transport packages into the project, and activated Relay in the Packages and SDK Download Center.

Issue is that I can’t seem to find the UnityTransport component in my project, mentioned here:
https://docs-multiplayer.unity3d.com/docs/relay/relay/index.html

and here:
https://docs.unity.com/relay/relay-and-ngo.htm

In my project, this is all I see in the NetworkManager:
7701577--964531--upload_2021-12-2_6-9-12.png

My only clue is that second link also mentions installing a “Transport Adapter” package in the SDK Download Center, though this doesn’t appear in my dashboard:

Very confused as Google only finds references to the “Transport Adapter” package on that one page. What am I missing here? Is it the package I’m missing, or is that unrelated?

Hi,

Check this video:

Minute 6:10 he explains how to import the netcode.adapter.utp

Hope it helps.

Update: I managed to get UnityTransport.cs into the project by adding com.unity.netcode.adapter.utp to my package manager. Now I can add the UnityTransport component and assign it the NetworkManager, but I still cannot reference it in script:

As you can see I’m just reaching for anything that might work in the usings lol. Any tips would be highly appreciated!

Ah thanks, I’ll give it a watch!

Huh, he just adds “UnityTransport” to the script (@ 11:00) and it works straight away. I’ve double-checked and all the packages he references are up to date in the Package Manager and appear in the manifest. And none of my references of Netcode / Relay classes have any issues.

I can see and open UnityTransport.cs in (\Library\PackageCache\com.unity.netcode.adapter.utp@1.0.0-pre.3\Runtime), plus it’s on the NetworkManager as a component so I should be able to reference it.

Many times I fix that type of issue by doing this:

Preferences > External Tools > Regenerate project files
Local packages must be checked

7701784--964591--Fail3.PNG

YES! It has now appeared, thank you so much!! (ɔ◔‿◔)ɔ :heart: For anyone else having this issue, I also removed the general Unity Transport package that I had added while trying to get this working, but kept the Unity Transport for Netcode for GameObjects package. Not sure it made a difference, but no sense having it there if it isn’t needed.

1 Like

So pretty sure I’ve got Netcode + Relay working in the Editor, but the Build version runs into the following error when trying to host or join:

[Authentication]: Request completed with error: {“title”:“INVALID_PARAMETERS”,“detail”:“Valid ID Domain not specified”,“details”:[ ],“status”:400}"

According to this link, this indicates my project is not properly linked to the Dashboard through the services panel in the Editor. However, both the Dashboard and the services panel say they are linked and Relay turned on (and I’ve toggled this a couple of times on both ends for good measure). Plus, I know it’s working in general since I receive the Relay join code as expected when hosting in the Editor, with no errors reported.

(EDIT: confirmed it’s working in the Editor by disabling Relay in the Dashboard, which then returns the following error when trying to host: Exception thrown when attempting to start Relay Server. Server not started. Exception: One or more errors occurred.)

Anyone got any ideas what I’m doing wrong?

Got it working in the build by adding com.unity.services.authentication to the package manager. Not sure why I had to add that one explicitly, and still having some issues when the build is trying to join the Editor, but these are probably general bugs I can fix. Hopefully this helps someone!

2 Likes