Search Unity

Feature Request Testing connection before starting

Discussion in 'Netcode for GameObjects' started by daniel_lochner, Oct 20, 2021.

  1. daniel_lochner

    daniel_lochner

    Joined:
    Jun 9, 2016
    Posts:
    112
    Hi there,

    Is there any way to test a client’s connection to a game prior to starting?

    I’d like to use for example
    NetManager.TestClient()
    , and if the connection approval returns positive, then I know a game exists with those details (from the network config) and can be connected to. I could then invoke
    NetManager.StartClient()
    to finally join the game. Similarly for
    NetManager.TestHost()
    in the event the room name is already in use, or there is another type of error.

    Thanks!
     
unityunity