Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Why does the Network Profiler report different stats between the server and the client?

Discussion in 'Netcode for GameObjects' started by adamgryu, Jul 26, 2023.

  1. adamgryu

    adamgryu

    Joined:
    Mar 1, 2014
    Posts:
    185
    I'm trying to micro-optimize a custom transform sync, and I'm noticing different stats here.
    I'm trying to weigh the overhead cost of using NetworkVariables vs. RPCs vs. Unnamed Messages and I'm not sure which values to trust.

    Host:
    upload_2023-7-25_19-46-5.png

    Client:
    upload_2023-7-25_19-45-43.png

    What's curious to me is that the position and velocity are different sizes on the host while they appear the same on the client. What's happening here? Can I get meaningful optimization by not using NetworkVariables here?