{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Struct GhostComponentSerializer | Netcode for Entities | 1.1.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct GhostComponentSerializer

    Mostly for internal use. A collection helper functions used by code-gen and some runtime systems. See GhostSendSystem, GhostReceiveSystem, and others. To work with ghost snapshots, see SnapshotData and SnapshotDynamicDataBuffer. It also declares all the ghost component/buffers serializers delegate methods, that are used to register (at runtime) the code-generated serializers (to the GhostComponentSerializer.State collection).

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.NetCode.LowLevel.Unsafe
    Assembly: solution.dll
    Syntax
    public struct GhostComponentSerializer

    Methods

    Name Description
    ChangeMaskArraySizeInBytes(int)

    Compute the number of bytes necessary to encode the required number of bits

    ChangeMaskArraySizeInUInts(int)

    Compute the number of uint necessary to encode the required number of bits

    ConvertToUnsafeList(IntPtr, int)

    Helper method to construct an UnsafeList<T> from a given IntPtr and length.

    CopyFromChangeMask(IntPtr, int, int)

    Extract from the source buffer an unsigned integer, representing a portion of a bitmask starting from the given offset and number of bits.

    CopyToChangeMask(IntPtr, uint, int, int)

    For internal use only, copy the src bitmask to a destination buffer, to the given offset and for the required number of bits.

    IntPtrCast<T>(ref T)

    Return a pointer to the memory address for the given value instance.

    SizeInSnapshot(in State)

    Helper that returns the size in bytes (aligned to 16 bytes boundary) used to store the component data inside SnapshotData.

    SnapshotSizeAligned(int)

    Align the give size to 16 byte boundary.

    SnapshotSizeAligned(uint)

    Align the give size to 16 byte boundary

    TypeCast<T>(IntPtr, int)

    Helper method to get a reference to a struct data from its address in memory.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)