Unity + .NET

ULinkRPC Docs

Documentation site for ULinkRPC.

Documentation

API Reference

Generated from C# XML documentation comments

Runtime types, extension points, lifecycle notes, parameters, return values, and exceptions.

Getting Started

Starter workflow

Create a Unity, Tuanjie, or Godot client with a .NET server and regenerate code from shared contracts.

Latest Posts

API Layers

2026-06-05

ULinkRPC exposes several kinds of public APIs. public means the type can be referenced by C#, but it does not always mean the type is a normal application entry point.

Use this page to decide which APIs your project should depend on directly.

Stable User API

These APIs are intended for regular application projects. They are the safest APIs to build long-lived code on.

  • RPC contract attributes such as [RpcService], [RpcMethod], [RpcNotificationContract], and [RpcNotification].
  • Generated client facade and generated server binders.
  • RpcClientOptions.
  • RpcClientRuntime when used through the generated client flow.
  • RpcServerHostBuilder.
  • RpcServerHost.
  • RpcServerLimits.
  • Official transport constructors.
  • Official serializer constructors.
  • RpcKeepAliveOptions.
  • RpcException.
  • RpcStatus.

User-facing tutorials and starter projects should stay inside this layer whenever possible.

API Stability Roadmap

2026-05-15

ULinkRPC is currently ready for a soft freeze: the main integration path, wire protocol direction, and package boundaries are mostly stable, but it is not yet ready to declare a full hard freeze or 1.0 API freeze.

This document records the current judgment and future optimization direction. It is not a one-time checklist; it is the basis for evaluating breaking changes before future releases.

Current Judgment

Areas that can be stabilized first:

Godot Integration Guide

2026-05-12

ULinkRPC.Starter can generate Godot 4.x C# clients. The Godot path shares the same Shared contracts, server project, and Roslyn Source Generator flow as the Unity path.

Create a Godot Project

Start with WebSocket + JSON:

dotnet tool install -g ULinkRPC.Starter
ulinkrpc-starter new --name MyGame --client-engine godot --transport websocket --serializer json
cd MyGame
dotnet run --project Server/Server/Server.csproj

The client is located at:

MyGame/Client

Open that directory with Godot 4.x, wait for Godot to generate and restore the C# solution, open Main.tscn, and click Play.

Performance Tuning

2026-05-12

This page only describes tuning directions supported by the current repository. The project has not published official benchmark numbers; do not state serializer or transport performance as absolute facts. Before production, measure with your own payloads, devices, network conditions, and engine versions.

Prefer Observability Before Performance

For first integration, use websocket + json. JSON payloads make DTO shapes, field names, and server behavior easier to inspect. After the path is stable, evaluate memorypack or other transports.

DTO Versioning

2026-05-12

ULinkRPC contracts start from shared C# interfaces and DTOs. The source generator uses [RpcService], [RpcMethod], and DTO types to generate glue code for both sides. The core rule for versioning is: keep the wire shape compatible first, roll out gradually, then remove old fields or methods only after old clients are gone.

Do Not Reuse Stable IDs

[RpcService(id)] and [RpcMethod(id)] are part of protocol routing. Do not reuse a service id or method id that has already shipped. After deleting a method, keep a record of its id so old clients cannot route requests to a new meaning by accident.