Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Is there any way to know when Netcode is about to reach the next tick?

Discussion in 'Netcode for GameObjects' started by yosimba2000, Aug 5, 2022.

  1. yosimba2000

    yosimba2000

    Joined:
    Jun 3, 2021
    Posts:
    25
    I am manually syncing some things over. The way my code works right now is that I serialize something, null it out, then recreate that something each frame. I would rather serialize, and then null it out when a network tick arrives (so I can send it just in time).

    Alternatively, I could serialize something, wait for network tick to send it out, then null it out.

    Are there any network tick events I can subscribe to or something?
     
  2. itisMarcii_

    itisMarcii_

    Joined:
    Apr 5, 2022
    Posts:
    111
    NetworkManager.Singelton.NetworkTickSystem.Tick


    Out of my head, but that is the tick event.
     
  3. yosimba2000

    yosimba2000

    Joined:
    Jun 3, 2021
    Posts:
    25
    Thanks!