[Bug or Stupid] Unity Relay's deprecation broke cross-platform editor testing?

Hi All!

Unity Versions Tested:
6000.0.26f1
6000.0.34f1

Mentioned Package Versions:
Relay 1.0.5 (deprecated)
Netcode for GameObjects 2.2.0
Unity Transport 2.4.0
Multiplayer Services 1.1.0

Game Context:
I am building a WebGL and a Windows game in the same project. The WebGL version is the Client, and the Windows version is the Server. The controls are similar to Jackbox, having any web-enabled device as a client/controller and a computer as the server/game.

Issue:
Prior to the Relay package being deprecated recently (Feb 2025), I was able to use ParallelSync to open up 2 editors (one as Server, and one as Client) and the Client was able to connect to the Server.
As soon as the Relay package was marked as deprecated, this is no longer the case. I can no longer connect a client to a server getting the following messages (in this order) after the ‘Connect Timeout MS’ and ‘Max Connect Attempts’ has expired:

Failed to establish connection with the Relay server (server didn't answer any BIND message).
0x00007ffe982e473e (Unity) Stacktrace::GetStacktrace
0x00007ffe968422fa (Unity) DefaultBurstRuntimeLogCallback
0x00007ffe9614c1aa (Unity) BurstCompilerService_CUSTOM_RuntimeLog
0x00007ffe58e8ee5f (71533516c708d0bfe6172808544f90a) Unity.Networking.Transport.RelayLayer.ReceiveJob`1<Unity.Networking.Transport.UnderlyingConnectionList>.ProcessRelayServerConnection (at D:/Github Projects/the-box-game_clone_0/Library/PackageCache/com.unity.burst/.Runtime/Library/PackageCache/com.unity.transport/Runtime/Layers/RelayLayer.cs:368)
0x00007ffe58e8bd81 (71533516c708d0bfe6172808544f90a) Unity.Jobs.IJobExtensions.JobStruct`1<Unity.Networking.Transport.RelayLayer.ReceiveJob`1<Unity.Networking.Transport.UnderlyingConnectionList>>.Execute(ref Unity.Networking.Transport.RelayLayer.ReceiveJob`1<Unity.Networking.Transport.UnderlyingConnectionList> data, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, ref Unity.Jobs.LowLevel.Unsafe.JobRanges ranges, int jobIndex) -> void_0d64390541958b43604801c180219108 from UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null (at D:/Github Projects/the-box-game_clone_0/Library/PackageCache/com.unity.burst/.Runtime/unknown/unknown:0)
0x00007ffe58e8b4fd (71533516c708d0bfe6172808544f90a) 8de023688c1b71ddd3534988b741c831
0x00007ffe96b8dea5 (Unity) ExecuteJob
0x00007ffe96b8ef3d (Unity) ForwardJobToManaged
0x00007ffe96b8b089 (Unity) ujob_execute_job
0x00007ffe96b8a321 (Unity) lane_guts
0x00007ffe96b8d1f4 (Unity) worker_thread_routine
0x00007ffe96d831cd (Unity) Thread::RunThreadWrapper
0x00007fff1de2259d (KERNEL32) BaseThreadInitThunk
0x00007fff1eb6af38 (ntdll) RtlUserThreadStart
Transport failure! Relay allocation needs to be recreated, and NetworkManager restarted. Use NetworkManager.OnTransportFailure to be notified of such events programmatically.
UnityEngine.Debug:LogError (object)
Unity.Netcode.Transports.UTP.UnityTransport:OnEarlyUpdate () (at ./Library/PackageCache/com.unity.netcode.gameobjects/Runtime/Transports/UTP/UnityTransport.cs:957)
Unity.Netcode.NetworkTransport:EarlyUpdate () (at ./Library/PackageCache/com.unity.netcode.gameobjects/Runtime/Transports/NetworkTransport.cs:126)
Unity.Netcode.NetworkManager:NetworkUpdate (Unity.Netcode.NetworkUpdateStage) (at ./Library/PackageCache/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs:324)
Unity.Netcode.NetworkUpdateLoop:RunNetworkUpdateStage (Unity.Netcode.NetworkUpdateStage) (at ./Library/PackageCache/com.unity.netcode.gameobjects/Runtime/Core/NetworkUpdateLoop.cs:191)
Unity.Netcode.NetworkUpdateLoop/NetworkEarlyUpdate/<>c:<CreateLoopSystem>b__0_0 () (at ./Library/PackageCache/com.unity.netcode.gameobjects/Runtime/Core/NetworkUpdateLoop.cs:214)

What works and what doesn’t:
WORKING - Build the client and upload it to Itch.io, Server in editor.
WORKING - Build both Client and Server.
NOT WORKING - Build the Server, Client in editor. (no ParallelSync)
NOT WORKING - Server in editor on computer 1, Client in editor on computer 2. (no ParallelSync)

What I’ve tried:

  • Restarted my computer (to check if it was a blocked socket)
  • Updating from Relay to Unity.Services.Relay (The new Multiplayer.Services they say to use instead)
  • Updating/Reinstalling Unity Transport
  • Reinstalling Netcode for GameObjects
  • Opening the project on two separate computers to try and connect

Conclusion:
I’m so lost. I’m suppose to be showing the game off for the first time during the Steam Couch Coop Fest, but my time is being spent constantly building just to test simple bug fixes. I now have to switch build profile, build the web version, switch back, upload the web version, then test. It takes up to 10 minutes (I’ve gotten it down to a fine art past few days) to test one small bug fix.

Any help would be much appreciated.
Andrew.

You’re aware of Multiplayer Playmode? You no longer need to make clones of the entire project, and it’s officially supported (requires Unity 6).

1 Like

Hi @AndrewIndieDev,

The deprecation of Relay (1.0.5) should not cause any issues, as it does not include code changes.

Could you provide a minimal reproducible project so we can investigate? If that’s not possible, please consider submitting a bug report with your project attached. You can follow the step-by-step guide here. Once submitted, you’ll receive a case number—please share it with us so we can assist you further.

Cheers,
Tristan

1 Like

Hey CodeSmile!

I’ve seen your name a lot when I go through the discussions every now and again, thanks for all the help you’ve provided people!

Yes, I am aware of PlayMode. I should have added that in here too as a tested feature. Correct me if I am wrong, but Playmode only allows you to run the same build profile as the main project? I would need one to be the Windows build profile, and one to be WebGL. If I am wrong in that, I will do some more research on how to utilise Playmode better. I was originally using ParallelSync, and didn’t want to change my workflow for this project. I was going to move on to Playmode for the next project :slight_smile:

Hi Tristan, thanks for the reply!

I am out right now, but I will create a new project and try to recreate the issue as soon as I get home.

If that works fine, then I will create a ticket and submit my project.

Thanks,
Andrew.

Hey @tdep,

I have created a new project and tested the same setup and it seems to work just fine! I guess I messed something up myself the same day the deprecation hit and thought it was connected. I will take another look at my own project and see if I can find the issue, if I can’t I will send the project in, just in case it could be a bug that’s surfaced with my multiple Unity Version upgrades, or some other plugin.

Here is the GitHub repo for that new project I was using to test:

And here are the steps I took to create the project, if you are interested:

  1. Created a brand new default Unity 6000.0.34f1 URP project
  2. Installed ‘Multiplayer Services’ package (version 1.1.0)
  3. Installed ‘Netcode for GameObjects’ package (version 2.2.0)
  4. Installed ‘Multiplayer Widgets’ package (version 1.0.1) for ease of UI setup
  5. Downloaded and added ‘ParrelSync’ (version 1.5.2) from GitHub:
    Release 1.5.2 ¡ VeriorPies/ParrelSync ¡ GitHub
  6. Created an empty GameObject in the default SampleScene
  7. Added NetworkManager, and Unity Transport to the GameObject
  8. Assigned the UnityTransport to the NetworkManager in the Inspector
  9. Selected the ‘Relay Unity Transport’ from the dropdown menu on the UnityTransport script
  10. Changed the ‘Max Connect Attempts’ to 10 on the UnityTransport for faster testing
  11. Added ‘Multiplayer Widgets > Create > Create Session’ GameObject to the SampleScene and positioned it down the bottom left
  12. Imported TMP essentials as prompted
  13. Added ‘Multiplayer Widgets > Join and Leave > Join Session By Roomcode’ GameObject to the SampleScene and positioned it to the bottom left (above the Create Session GameObjects)
  14. Added ‘Multiplayer Widgets > Info > Show Session Code’ and positioned it to the top right
  15. Opened up the Clones Manager from menu ‘ParrelSync > Clones Manager’ (I guess they spelt it wrong?)
  16. Created a new clone of the project
  17. Opened the newly created Cloned Project
  18. Cloned Project: Swapped the active Build Profile to Web
  19. Cloned Project: Enabled ‘Use Web Sockets’ on the UnityTransport script
  20. Original Project: Linked my project to Unity Services
  21. Pressed ‘Play’ on both projects
  22. Original Project: Started a server
  23. Cloned Project: Tried to join the server, got an error as authentication picked up the same sign in account
  24. Grabbed my Authentication sign in from my previous project so it works with ParrelSync, and added it to the Original Project (Relay script)
  25. Attached the Relay script to the NetworkManager GameObject
  26. Tested again, but the authentication sign-in from the widgets clashed with mine, so removed the widgets
  27. Updated the Relay script to handle creating and connecting to servers
  28. Original Project: In the Inspector, the ‘debugging’ on Relay to true, and ‘maxPlayers’ to 10
  29. Created a create button, and a join button (room code will be shown in the Console), and an InputField
  30. Created a simple script to handle the button presses to call ‘Relay.Instance.CreateRelay()’ and ‘Relay.Instance.JoinRelay(joinCode)’, added the script to the Canvas GameObject, assigned the button actions in Inspector
  31. Cloned Project: In the Inspector, enabled ‘isWebVersion’ to true on Relay, and ‘Use Web Sockets’ to true on NetworkManager
  32. Tested again, the connection worked

Why? You’re on Unity 6, you can and should use Multiplayer Playmode. This does the same thing but without doing a 1:1 clone of the project.

Hey CodeSmile

Why: Because my main project currently uses ParrelSync, and I am not changing that until next project as this project has been in development since before Multiplayer PlayMode was released.

Also, does Multiplayer PlayMode support different build profiles? I would need the main project to be my Windows build profile, and the virtual project to be a WebGL build profile. I haven’t done any extensive research on PlayMode yet as I haven’t started using it.

Cheers,
Andrew.

Hmmm I actually don’t know. They did add some “setup” window which I never used.

They do support Multiplayer Roles ie you can have one player be the server or host, another a pure client with server-side code and assets stripped and vice versa.

Hey CodeSmile,

I’ve created a workaround using PlayMode. I had an epiphany last night of how I can get around the different builds and use just one build profile for the server and client.

Thanks for your suggestion. Without it I would have just disregarded PlayMode until next project after it didn’t work the first time.

Cheers,
Andrew.

1 Like