ULinkRPC.CodeGen
0.6.0
See the version list below for details.
dotnet tool install --global ULinkRPC.CodeGen --version 0.6.0
dotnet new tool-manifest
dotnet tool install --local ULinkRPC.CodeGen --version 0.6.0
#tool dotnet:?package=ULinkRPC.CodeGen&version=0.6.0
nuke :add-package ULinkRPC.CodeGen --version 0.6.0
ULinkRPC.CodeGen
Command-line code generator for ULinkRPC.
Install (dotnet tool)
dotnet tool install -g ULinkRPC.CodeGen
Usage
ulinkrpc-codegen [options]
Modes
unity: generate Unity client + binder code.server: generate server binders +AllServicesBinder.
Generated client stubs now depend on ULinkRPC.Core.IRpcClient.
Generated client calls use typed descriptors (RpcMethod<TArg, TResult> / RpcPushMethod<TArg>) instead of passing raw service/method ids.
Generated Unity client output also includes IRpcClient extension factories (for example client.CreatePlayerService()) so business code does not instantiate generated client types directly.
Generated Unity client output includes a mandatory grouped facade RpcApi; business code should enter via client.CreateRpcApi() and access services through named groups (for example rpcApi.Game.Player).
Unity generated code namespace is derived from Unity output directory (for example Assets/Scripts/Rpc/RpcGenerated → Rpc.Generated).
Generated files now inherit using directives declared by contract sources so referenced types resolve correctly.
Contract parsing is implemented via Roslyn syntax trees for better correctness across C# language forms.
Generated binders reference ULinkRPC.Core + ULinkRPC.Server and include both Bind(RpcServer, IYourService) and delegate-based Bind(...) overloads. For IRpcService<TSelf, TCallback> services, server binder also emits Bind(RpcServer, Func<TCallback, TSelf>) to wire callback proxy and implementation together.
Options
--contracts <path>Path to contract sources (required).--mode <unity|server>Generation mode (required).--output <path>Output directory for generated files.--namespace <ns>Namespace for generated Unity code.--server-output <path>Output directory for server binders.--server-namespace <ns>Namespace for server binders.
Default Behavior
- Unity mode defaults output to
Assets/Scripts/Rpc/RpcGeneratedunder detected Unity project root. - If Unity project root cannot be detected, pass
--outputexplicitly. - Unity namespace defaults to value derived from output path unless
--namespaceis provided. - Server mode defaults output to
./Generated. - Server namespace defaults to
<contracts namespace>.Server.Generatedunless--server-namespaceis provided.
Paths can be overridden via options.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.8.0 | 0 | 3/6/2026 |
| 0.7.0 | 5 | 3/6/2026 |
| 0.6.0 | 5 | 3/6/2026 |
| 0.5.0 | 22 | 3/6/2026 |
| 0.4.0 | 63 | 3/4/2026 |
| 0.2.2 | 84 | 2/26/2026 |
| 0.2.0 | 84 | 2/25/2026 |
| 0.1.7 | 97 | 2/19/2026 |
| 0.1.6 | 90 | 2/18/2026 |
| 0.1.5 | 92 | 2/18/2026 |
| 0.1.4 | 95 | 2/8/2026 |
| 0.1.3 | 95 | 2/8/2026 |
| 0.1.2 | 99 | 2/8/2026 |
| 0.1.1 | 104 | 2/3/2026 |
| 0.1.0 | 92 | 2/18/2026 |