Hey everyone :)
Just some background information before I describe my problem.
I build a unity game with the fishnet networking solution, for the transport inside fishnet im using the tugboat transport, the game itself works and players can connect. ( on locaalhost and remote private server)
The game consists of 2 scenes, the main menu and the game scene itself.
The game scene has the whole networking stuff implemented so I am using this scene also as the server scene that has everything needed for playfab implemented. (I think)
On the server is a class that derives from monobehaviour with following functions:
static void OnPlayerConnected() => adds players to list and UpdateConnectedPlayers() PlayFab.PlayFabMultiplayerAgentAPI.Start(); => inside the start function PlayFab.PlayFabMultiplayerAgentAPI.ReadyForPlayers(); => Coroutine startet after start PlayFab.PlayFabMultiplayerAgentAPI.SendHeartBeatRequest(); => Coroutine startet after start
Everything works with the matchmaking and a server gets spawned as soon as 2 players are matched.
The docker logs on this server are also looking fine.
But I cant get my players to connect to the server, what am I missing?
Currently im doing it like(the correct ip and port is returned):
private void OnGetMatch(GetMatchResult result){ string ip = result.ServerDetails.IPV4Address; Port port = result.ServerDetails.Ports[0]; tugboatTransport.SetClientAddress(ip); tugboatTransport.SetPort((ushort)port.Num); tugboatTransport.StartConnection(false); // false = isServer },
Hey everyone :)
Just some background information before I describe my problem.
I build a unity game with the fishnet networking solution, for the transport inside fishnet im using the tugboat transport, the game itself works and players can connect. ( on locaalhost and remote private server)
The game consists of 2 scenes, the main menu and the game scene itself.
The game scene has the whole networking stuff implemented so I am using this scene also as the server scene that has everything needed for playfab implemented. (I think)
On the server is a class that derives from monobehaviour with following functions:
static void OnPlayerConnected() => adds players to list and UpdateConnectedPlayers() PlayFab.PlayFabMultiplayerAgentAPI.Start(); => inside the start function PlayFab.PlayFabMultiplayerAgentAPI.ReadyForPlayers(); => Coroutine startet after start PlayFab.PlayFabMultiplayerAgentAPI.SendHeartBeatRequest(); => Coroutine startet after start
Everything works with the matchmaking and a server gets spawned as soon as 2 players are matched.
The docker logs on this server are also looking fine.
But I cant get my players to connect to the server, what am I missing?
Currently im doing it like(the correct ip and port is returned):
private void OnGetMatch(GetMatchResult result){ string ip = result.ServerDetails.IPV4Address; Port port = result.ServerDetails.Ports[0]; tugboatTransport.SetClientAddress(ip); tugboatTransport.SetPort((ushort)port.Num); tugboatTransport.StartConnection(false); // false = isServer }