Multiple consecutive connections with Unity relay

Hey,

I’ve linked up my application to unity relay, everything is working fine in the first session.

Now, I’ve tried to shutdown the session (using NetworkManager.Instance.Shutdown) and then starting a new one (via StartHost). However, every time I try this I eventually receive these two messages:

Needing to recreate the Relay allocation is not convenient, because this implies re-communicating joincodes.

What am I doing wrong? Or is this not possible?

I did read in the documentation that initially there’s only 10 seconds to bind the relay, and I see here that is trying to bind, so I can understand why that would not work.

I suppose there is no way to separate the connection from the hosted session…?

Do you create a new allocation when trying to connect again?

1 Like

No, I did not, it was not in a place in the flow where I could copy paste join codes again. However, I did start thinking along this direction. I can communicate the join code via the old connection, then kill the connection, then start a new session. This should work fine!