docs.unity3d.com
    Show / Hide Table of Contents

    Struct SnapshotDynamicBuffersHelper

    Helper class for managing ghost buffers data

    Namespace: Unity.NetCode
    Syntax
    public struct SnapshotDynamicBuffersHelper

    Methods

    CalculateBufferCapacity(UInt32, out UInt32)

    Declaration
    public static uint CalculateBufferCapacity(uint dynamicDataSize, out uint slotSize)
    Parameters
    Type Name Description
    UInt32 dynamicDataSize
    UInt32 slotSize
    Returns
    Type Description
    UInt32

    GetDynamicDataCapacity(UInt32, Int32)

    Return the currently available space (masks + buffer data) avaiable in each slot

    Declaration
    public static uint GetDynamicDataCapacity(uint headerSize, int length)
    Parameters
    Type Name Description
    UInt32 headerSize
    Int32 length
    Returns
    Type Description
    UInt32

    GetDynamicDataChangeMaskSize(Int32, Int32)

    Compute the size of the bitmask for the given number of elements and mask bits. The size is aligned to 16 bytes

    Declaration
    public static int GetDynamicDataChangeMaskSize(int changeMaskBits, int numElements)
    Parameters
    Type Name Description
    Int32 changeMaskBits
    Int32 numElements
    Returns
    Type Description
    Int32

    GetDynamicDataPtr(Byte*, Int32, Int32)

    Retrieve the dynamic buffer history slot pointer

    Declaration
    public static byte *GetDynamicDataPtr(byte *dynamicDataBuffer, int historyPosition, int bufferLength)
    Parameters
    Type Name Description
    Byte* dynamicDataBuffer
    Int32 historyPosition
    Int32 bufferLength
    Returns
    Type Description
    Byte*
    Exceptions
    Type Condition
    IndexOutOfRangeException
    InvalidOperationException

    GetHeaderSize()

    Declaration
    public static uint GetHeaderSize()
    Returns
    Type Description
    UInt32
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023