Search Unity

Question How do I determine the size a FastBufferWriter needs to be?

Discussion in 'Netcode for GameObjects' started by Senshi, Jan 3, 2022.

  1. Senshi

    Senshi

    Joined:
    Oct 3, 2010
    Posts:
    557
    Hi all,

    Probably a silly question, but just wanna make sure I'm doing this right. Let's say I have an
    INetworkSerializable
    containing three ints. Can I simply make the buffer have a size of 12, or do I need to worry about things like struct overhead, or memory alignment?

    Thanks!