Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Resolved How to tell client to run something on a specific time?

Discussion in 'Netcode for GameObjects' started by PersianKiller, Jan 12, 2023.

  1. PersianKiller

    PersianKiller

    Joined:
    Jul 16, 2017
    Posts:
    132
    for example I want to tell the client that run a function on 10 o'clock.

    now I send server time as a string to the client then decode it and compare it to server time on client and then run function when the time is okay , I just wanted to know if there is an easier way .
     
  2. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    440
    Does it have to run at 10 o'clock server time or client time? It's important to estabilish this, as time zone differences may exists.

    If the answer is "Server time", what you're doing is ok.
    If the answer is "Client time", you don't need to send anything from the server
     
    PersianKiller likes this.