- Home /
Creating a client player and a host player in a single device and networking them correspondingly
I am aiming to create a bit complicated network. I am trying my best to explain it. Let me know if you need further details.
Goal:
1) I am trying to create a game in which four players can join. (Game created by one of the four players)
2) Once the players join a game they can create teams.
3) There can be a maximum of two teams so the other two players can join the created teams. (Two teams created by two of the players)
4) Now the main goal is to pass the data between Team 1 and Team 2.
Issues/How I am doing it: (For now Let me explain with just two players) 1) Player 1 hosts the game hence becoming both server and client.
2) Player 2 joints the game and becomes the client.
3) Player 1 creates team 1 thus becoming a host again.
4) Player 2 creates team 2 thus becoming a host.
Overall Player 1 is hosts both the game and the team. Player 2 is a client to the game and hosts a team.
So now once player 2 becomes the team host it loses communication with the Game Server or player 1
I tried the following:
1) Created two separate players for each device. A player that can communicate with the game server and a player to communicate with the team server.
2) Tried to move each of the player to a different scene for no reason at all.
Both didn't work. As soon as the player 2 becomes a team host it can no longer use Cmd function and run [Command] on the server.
Anything will be appreciated. Thank you
Your answer
Follow this Question
Related Questions
Network command is running on client? 1 Answer
Why is my client player unaffected by a networked explosion? 0 Answers
UNet NetworkServer.Spawn() not working / Failed to spawn server object, assetId= 2 Answers
Send information from one player to another. Unity Multiplayer 2 Answers
are client hosted servers limited by my 20 person ccu? 0 Answers