docs.unity3d.com
    Show / Hide Table of Contents

    Struct SnapshotDynamicBuffersHelper

    Helper class for managing ghost buffers data. Internal use only.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.NetCode
    Syntax
    public struct SnapshotDynamicBuffersHelper

    Methods

    CalculateBufferCapacity(UInt32, out UInt32)

    Return the history buffer capacity and the resulting size of each history buffer slot necessary to store the given dynamic data size.

    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) available 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()

    Get the size of the header at the beginning of the dynamic snapshot buffer. The size of the header is constant.

    Declaration
    public static uint GetHeaderSize()
    Returns
    Type Description
    UInt32
    In This Article
    • Methods
      • CalculateBufferCapacity(UInt32, out UInt32)
      • GetDynamicDataCapacity(UInt32, Int32)
      • GetDynamicDataChangeMaskSize(Int32, Int32)
      • GetDynamicDataPtr(Byte*, Int32, Int32)
      • GetHeaderSize()
    Back to top
    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