Til.Unity.Lombok 1.2.12

dotnet add package Til.Unity.Lombok --version 1.2.12                
NuGet\Install-Package Til.Unity.Lombok -Version 1.2.12                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Til.Unity.Lombok" Version="1.2.12" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Til.Unity.Lombok --version 1.2.12                
#r "nuget: Til.Unity.Lombok, 1.2.12"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Til.Unity.Lombok as a Cake Addin
#addin nuget:?package=Til.Unity.Lombok&version=1.2.12

// Install Til.Unity.Lombok as a Cake Tool
#tool nuget:?package=Til.Unity.Lombok&version=1.2.12                

Unity.Lombok

源:

using Til.Lombok;
using Til.Unity.Lombok;
namespace AABB {
    [ILombok]
    public partial class Test {
        [BufferField] public int x;
        [BufferField] public int y;
        [BufferField] public int z;
    }
}

生成:

using Til.Lombok;
using Til.Unity.Lombok;
namespace AABB
{
#nullable enable
    public partial class Test
    {
        public static void read(Unity.Netcode.FastBufferReader reader, out Test value)
        {
            bool isNull;
            Unity.Netcode.ByteUnpacker.ReadValuePacked(reader, out isNull);
            if (isNull)
            {
                value = null!;
                return;
            }
            value = new Test();
            Unity.Netcode.NetworkVariableSerialization<int>.Read(reader, ref value.x);
            Unity.Netcode.NetworkVariableSerialization<int>.Read(reader, ref value.y);
            Unity.Netcode.NetworkVariableSerialization<int>.Read(reader, ref value.z);
        }
        public static void readDelta(Unity.Netcode.FastBufferReader reader, ref Test value)
        {
            bool isNull;
            Unity.Netcode.ByteUnpacker.ReadValuePacked(reader, out isNull);
            if (isNull)
            {
                value = null!;
                return;
            }
            if (value == null)
            {
                value = new Test();
            }
            int tag;
            Unity.Netcode.ByteUnpacker.ReadValuePacked(reader, out tag);
            if ((tag & (1 << 0)) != 0)
            {
                Unity.Netcode.NetworkVariableSerialization<int>.ReadDelta(reader, ref value.x);
            }
            if (9tag & (1 << 1)) != 0)
            {
                Unity.Netcode.NetworkVariableSerialization<int>.ReadDelta(reader, ref value.y);
            }
            if ((tag & (1 << 2)) != 0)
            {
                Unity.Netcode.NetworkVariableSerialization<int>.ReadDelta(reader, ref value.z);
            }
        }
        public static void write(Unity.Netcode.FastBufferWriter writer, in Test value)
        {
            if (value == null)
            {
                Unity.Netcode.BytePacker.WriteValuePacked(writer, true);
                return;
            }
            Unity.Netcode.BytePacker.WriteValuePacked(writer, false);
            Unity.Netcode.NetworkVariableSerialization<int>.Write(writer, ref value.x);
            Unity.Netcode.NetworkVariableSerialization<int>.Write(writer, ref value.y);
            Unity.Netcode.NetworkVariableSerialization<int>.Write(writer, ref value.z);
        }
        public static void writeDelta(Unity.Netcode.FastBufferWriter writer, in Test value, in Test previousValue)
        {
            if (value == null)
            {
                Unity.Netcode.BytePacker.WriteValuePacked(writer, true);
                return;
            }
            Unity.Netcode.BytePacker.WriteValuePacked(writer, false);
            int tag = 0;
            if (!object.Equals(previousValue.x, value.x))
            {
                tag = tag | (1 << 0);
            }
            if (!object.Equals(previousValue.y, value.y))
            {
                tag = tag | (1 << 1);
            }
            if (!object.Equals(previousValue.z, value.z))
            {
                tag = tag | (1 << 2);
            }
            Unity.Netcode.BytePacker.WriteValuePacked(writer, tag);
            if ((tag & (1 << 0)) != 0)
            {
                Unity.Netcode.NetworkVariableSerialization<int>.WriteDelta(writer, ref value.x, ref previousValue.x);
            }
            if ((tag & (1 << 1)) != 0)
            {
                Unity.Netcode.NetworkVariableSerialization<int>.WriteDelta(writer, ref value.y, ref previousValue.y);
            }
            if ((tag & (1 << 2)) != 0)
            {
                Unity.Netcode.NetworkVariableSerialization<int>.WriteDelta(writer, ref value.z, ref previousValue.z);
            }
        }
        public static void duplicateValue(in Test value, ref Test duplicatedValue)
        {
            if (value == null)
            {
                duplicatedValue = null!;
                return;
            }
            if (duplicatedValue == null)
            {
                duplicatedValue = new Test();
            }
            if (!object.Equals(duplicatedValue.x, value.x))
            {
                Unity.Netcode.NetworkVariableSerialization<int>.Duplicate(value.x, ref duplicatedValue.x);
            }
            if (!object.Equals(duplicatedValue.y, value.y))
            {
                Unity.Netcode.NetworkVariableSerialization<int>.Duplicate(value.y, ref duplicatedValue.y);
            }
            if (!object.Equals(duplicatedValue.z, value.z))
            {
                Unity.Netcode.NetworkVariableSerialization<int>.Duplicate(value.z, ref duplicatedValue.z);
            }
        }
        [UnityEditor.InitializeOnLoadAttribute]
        public static class TestInitializeOnLoad
        {
            static TestInitializeOnLoad()
            {
                Unity.Netcode.UserNetworkVariableSerialization<Test>.ReadValue = read;
                Unity.Netcode.UserNetworkVariableSerialization<Test>.WriteValue = write;
                Unity.Netcode.UserNetworkVariableSerialization<Test>.WriteDelta = writeDelta;
                Unity.Netcode.UserNetworkVariableSerialization<Test>.ReadDelta = readDelta;
                Unity.Netcode.UserNetworkVariableSerialization<Test>.DuplicateValue = duplicateValue;
            }
        }
    }
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.12 65 11/1/2024
1.2.11 73 10/27/2024
1.2.10 72 10/27/2024
1.2.9 67 10/27/2024
1.2.8 73 10/27/2024
1.2.7 64 10/27/2024
1.2.6 105 8/29/2024
1.2.5 113 8/17/2024
1.2.2 84 8/8/2024
1.1.2 76 8/6/2024
1.1.1 81 8/6/2024
1.0.6 71 7/25/2024
1.0.3 81 7/24/2024