Search Unity

Is it possible to poll for a lobby update outside of the update function?

Discussion in 'Multiplayer' started by The702Guy1, Feb 1, 2023.

  1. The702Guy1

    The702Guy1

    Joined:
    Apr 24, 2022
    Posts:
    48
    I'm pretty new to the multiplayer lobby and I would like to poll for an update only when a change is made to the lobby. Ideally the way I would like it to work is that when a data change is made to the lobby (e.g player joins/leaves, game mode is updated, etc.) it would send a call to all players in the lobby to then poll the lobby for an update and update the UI.

    I know this can be done in the update function but it seems like a waste of data to poll it every couple of seconds if no changes are being made. Is there a way to accomplish an update poll only when an update to the lobby takes place?