#Making a custom transport

18 messages · Page 1 of 1 (latest)

flint garnet
#

How can I learn how to make a custom transport? Any recommended resources?

reef fiber
flint garnet
# reef fiber inherit from our base Transport class, and look at other transports for how they...

I'm trying to do a transport to integrate Dsicord Game SDK (https://discord.com/developers/docs/game-sdk/lobbies and https://discord.com/developers/docs/game-sdk/networking), in a way which allows me to externally control things like the discord instance and the lobby creation.

Discord Developer Portal

Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.

Discord Developer Portal

Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.

flint garnet
reef fiber
flint garnet
#

Is there anything in the docs where I can find what each function in a Transport is supposed to be?

flint garnet
#

I've found https://storage.googleapis.com/mirror-api-docs/html/df/d40/class_mirror_1_1_transport.html, but some parts of it are unclear to me. More concretely:

  • Should my implementation invoke the callbacks declared, or is it done by the underlying Transport class?
  • Why is there a ClientConnect both receiving an address and an URI? What can I expect the address/URI to be?
  • What is GetBatchThreshold?
  • Should I implement any of the ...Update functions?
  • Should I implement OnApplicationQuit? If so, what should it do?
reef fiber
flint garnet
#

Talking about bugs, NetworkManager's OnlineScene says the following in its tooltip: "Clients will recieve a Scene Message to load the server's current scene when they connect.". Is this something I must handle myself or is it implemented by Mirror? I'd assume the later, but when a connection is established, the client remains in the Offline scene...

reef fiber
flint garnet
reef fiber
reef fiber
#

switch transports to ensure your test project works as expected

#

you can have more than one transport component on the Network Manager object...all that matters is which one is assigned to Network Manager's transport field.