Search Unity

[MLAPI] How can a connected user get the current state of a variable ?

Discussion in 'Netcode for GameObjects' started by LIVAI10, May 20, 2021.

  1. LIVAI10

    LIVAI10

    Joined:
    Nov 4, 2019
    Posts:
    7
    Hello,

    Does anyone know how a new user, after being connected to an other user can get the current state of all networked variable ?

    Or do you have a link to the documentation on this that i missed?

    Thank you !
     
  2. luke-unity

    luke-unity

    Joined:
    Sep 30, 2020
    Posts:
    306
    With MLAPI you always connect to the server. The server will send the state of all NetworkVariables automatically to all new connected clients.
     
  3. LIVAI10

    LIVAI10

    Joined:
    Nov 4, 2019
    Posts:
    7
    It work, thank you