com.unity.netcode.gameobjects@1.0.0
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Additional documentation and release notes are available at [Multiplayer Documentation](https://docs-multiplayer.unity3d.com). ## [1.0.0] - 2022-06-27 ### Changed - Changed version to 1.0.0. (#2046)
This commit is contained in:
@@ -6,6 +6,7 @@ namespace Unity.Netcode
|
||||
{
|
||||
/// <summary>
|
||||
/// Utility class for packing values in serialization.
|
||||
/// <seealso cref="ByteUnpacker"/> to unpack packed values.
|
||||
/// </summary>
|
||||
public static class BytePacker
|
||||
{
|
||||
@@ -282,14 +283,49 @@ namespace Unity.Netcode
|
||||
public void WriteValueBitPacked<T>(FastBufferWriter writer, T value) where T: unmanaged => writer.WriteValueSafe(value);
|
||||
#else
|
||||
|
||||
/// <summary>
|
||||
/// Maximum serializable value for a BitPacked ushort (minimum for unsigned is 0)
|
||||
/// </summary>
|
||||
public const ushort BitPackedUshortMax = (1 << 15) - 1;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum serializable value for a BitPacked short
|
||||
/// </summary>
|
||||
public const short BitPackedShortMax = (1 << 14) - 1;
|
||||
|
||||
/// <summary>
|
||||
/// Minimum serializable value size for a BitPacked ushort
|
||||
/// </summary>
|
||||
public const short BitPackedShortMin = -(1 << 14);
|
||||
|
||||
/// <summary>
|
||||
/// Maximum serializable value for a BitPacked uint (minimum for unsigned is 0)
|
||||
/// </summary>
|
||||
public const uint BitPackedUintMax = (1 << 30) - 1;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum serializable value for a BitPacked int
|
||||
/// </summary>
|
||||
public const int BitPackedIntMax = (1 << 29) - 1;
|
||||
|
||||
/// <summary>
|
||||
/// Minimum serializable value size for a BitPacked int
|
||||
/// </summary>
|
||||
public const int BitPackedIntMin = -(1 << 29);
|
||||
|
||||
/// <summary>
|
||||
/// Maximum serializable value for a BitPacked ulong (minimum for unsigned is 0)
|
||||
/// </summary>
|
||||
public const ulong BitPackedULongMax = (1L << 61) - 1;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum serializable value for a BitPacked long
|
||||
/// </summary>
|
||||
public const long BitPackedLongMax = (1L << 60) - 1;
|
||||
|
||||
/// <summary>
|
||||
/// Minimum serializable value size for a BitPacked long
|
||||
/// </summary>
|
||||
public const long BitPackedLongMin = -(1L << 60);
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user