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
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 |
| IntPtrCast<T>(ref T) | Return a pointer to the memory address for the given |
| 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. |