- Home /
NETWORKING: Start as Host if no Host; Otherwise Start as Client
Topic says it all. This is a simple versus game. Two players, Host and Client. I don't want to use the network HUD, I want the game to automatically connect. If you're the first one there, you should connect as the Host. If there's already a host, you should connect as Client.
Alternatively, if there's a way to check the IP address of the current location, then I can set to only Start as Host from MY IP and everyone else starts as client.
(Aside: I do not want to have a server only version running, as that seems like unnecessary overhead for me to have two instances running, the Server and my client, when I can run one as a host, and let my buddy connect as a client. Just need a way to make sure we're both not clients or both not hosts!)
I'm still looking for an answer to this question. I'm using Mirror, and I've tried NetworkManager.isNetworkActive and NetworkServer.active. Nothing seems to tell me if someone else has already started a game I can join.
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
Host and Client not Joining properly 0 Answers
Why is the command function not being called on the client? 0 Answers
Object not updating on host 1 Answer
Requesting data from server 1 Answer