I’m using Relay with Netcode for Entities and I’m creating a new INetworkStreamDriverConstructor to assign to
NetworkStreamReceiveSystem.DriverConstructor before manually creating my client and server worlds. I assume I need to do it this way because you need the Relay Allocations in order to create RelaySeverData before doing all of the above. But I’d like to just let the default ClientServerBootstrap create the client and server worlds initially. But it appears that NetworkStreamReceiveSystem.OnCreate does work to create NetworkDriverStores and such as soon as the world is created. Can I go back after the fact and re-setup the NetworkDrivers for an existing client or server world once I get the Relay allocations and then call Connect and Listen to the endpoints? Or is it the case that NetworkDrivers need to be set up properly at world creation?
At the moment we don’t allow re-cratinging the Driver after the worlds has been created.
The only proper way to implement this today is to implement a custom bootstrap that does create the worlds and instead, first get the relay up and running (and retrieve the server data) and then create the world using the provided
RelayDriverConstructor.
It is far from ideal though.
Thanks for the info. That is what I’m currently doing so I’ll stick with that.