Until yesterday I used the now deprecated single packages for Relay, Lobbies etc. Now I moved to the unified package (Services Multiplayer) and the transfer was quite straight forward. The only code-wise change I made / had to make was changing the following line:
transport = NetworkManager.Singleton.GetComponent<UnityTransport>();
//old
transport.SetRelayServerData(new RelayServerData(Relayer.allocation, "dtls"));
//new
transport.SetRelayServerData(AllocationUtils.ToRelayServerData(Relayer.allocation, "dtls"));
Since then I run into the following error:
Failed to Start NetCode Join: Invalid allocation.
Unity.Services.Relay.Models.AllocationUtils.ToRelayServerData (Unity.Services.Relay.Models.Allocation allocation, System.String connectionType) (at ./Library/PackageCache/com.unity.services.multiplayer/Runtime/Relay/Models/AllocationUtils.cs:33)
Any Ideas what I’m doing wrong?
Cheers
Thank you for posting where they moved it! Couldn’t find it anywhere in code, nor in the changelogs, nor in the documentation. 
Worked for me after the change. Maybe double-check UnityTransport that it’s using Relay transport. Also which platform are you targeting? If WebGL you need to enable webSockets on UnityTransport and have to use “wss” or “ws” connection type in RelayServerData.
If not it seems to me that has more to do with where you are getting allocation. What I have goes somewhat like this:
Allocation allocation = await CreateRelay(2);
///
private async Task<Allocation> CreateRelay(int userCount) {
try {
return await RelayService.Instance.CreateAllocationAsync(userCount);
}
catch (RelayServiceException exception) {
Debug.LogError(exception.Message.ToString());
return default;
}
}
JoinAllocation allocation = await JoinRelay_Code(relayJoinCode);
///
private async Task<JoinAllocation> JoinRelay_Code(string relayCode) {
try {
return await RelayService.Instance.JoinAllocationAsync(relayCode);
}
catch (RelayServiceException exception) {
Debug.LogError(exception.Message.ToString());
return default;
}
}
I also found it somewhere in the forums. It doesn’t appear to be document.
Anyways, found the solution. Copy and paste error. Passed Host Allocation to both Host and Client.
Cheers