Please provide access to NetworkStreamDriver.DriverStore for custom INetworkInterface.

Hello,

I am integrating Steamworks into Unity Transport. With the 2.1 changes, nearly all hurdles are removed, but Netcode is making it a little hard still.

In this post, I talk about how I need internal access to netcode to be able to bind my custom Steamworks Network Interface before I call connect on it.

Could you please expose access to NetworkStreamDriver.DriverStore, or alternatively provide a public method Bind() that we can call before calling Connect(), to pass in our custom endpoint. Bind is public in Transport, but I just can’t get to it through netcode’s NetworkStreamDriver struct.

Thanks :).

2 Likes

Sorry, I missed a crucial point in the linked post which will let this work correctly next Transport version anyway:

However, a little discussion on discord with @Kmsxkuse on this subject…

Therefore, it might still be a good idea to have access to the driver store so we can interact with our custom interfaces.

1 Like

I just want to expand on this suggestion with a use-case I’ve encountered that making DriverStore on NetworkStreamDriver component public would help with.

In order to access EOS, I am provided by their API at login a “local user” handle that is basically the signature for all actions done through their API. However, due to mysterious black box shenanigans, this handle may change over the course of gameplay as EOS refreshes the user’s login and passes back a new handle.

Since the NetworkInterface driver has already been created, I need some way to inform the driver of this new handle for all Send/Receive packet requests. At the moment, I have a public static singleton that has hardcoded slots for a maximum two drivers (client and server, thins are always on IPC) that I manually monitor and refresh whenever necessary.

But this is just bad. A bandaid solution because I can not directly access the driver from a UI system which controls user supplied login info without internal access.

One current alternative I’ve floated will be relocating the entirety of the network handling into the driver, the UI code would feed in the user’s inputs at construction and the driver would be completely independent from there.

However, I would still require direct access to the driver since, to prevent overloading the RPC queue, I’ve bypassed the entire Netcode-Transport framework and manually generate and receive packets of text chat data to send through a second independent EOS channel. This will require login info and inputs from DOTS land during active gameplay and post-construction which requires public access to the driver.

1 Like

Yeah, we know and we are going to expose all these interfaces to you guys to customise the driver the way you want.

5 Likes

Is there an ETA for exposing the driver store? I’m trying to access it to check the value of IsAnyUsingSimulator, as I strip out predicted systems for the local IPC client, but apparently when using the network simulator the connection is forced to use a socket and so I need to stop the stripping.

https://docs.unity3d.com/Packages/com.unity.netcode@1.2/manual/playmode-tool.html#networksimulator

-edit-
Nevermind, I stumbled upon NetworkSimulatorSettings.Enabled, which is perfect for my use case.

1 Like