Create and Run a Lakona Project

Lakona is designed to start as a complete local workspace, not a pile of packages that you have to assemble by hand. One command can generate a server, shared contracts, hotfixable game logic, and a client project for Unity, Godot, or both engines over time.

First runnable project

Create a Lakona workspace, build the server and hotfix code, validate the runtime configuration, then connect from Unity or Godot.

MyGame/ Shared/ contracts and DTOs Server/ host and hotfix code Client/ Unity or Godot project
1

Install

.NET 10 SDK and Lakona.Tool.

2

Create

Generate a Unity or Godot project.

3

Build

Compile server and hotfix first.

4

Run

Start the server and open the client.

Prerequisites

.NET SDK 10.0+

Required for the generated game server. Older SDKs cannot build the default Lakona server projects.

Download from Microsoft

Unity or Godot

Install Unity 2022 LTS for Unity projects, or Godot 4.x .NET for Godot projects.

Install the CLI

Install Lakona.Tool as a global .NET tool:

Install Lakona.Tool
dotnet tool install -g Lakona.Tool

If you already installed it before, update it with:

Update an existing install
dotnet tool update -g Lakona.Tool

Create a Project

Choose the client engine first. The server shape stays the same.

Unity starter

Use this when the game client is a Unity 2022 LTS project.

lakona-tool new --name MyGame --client-engine unity --transport kcp --serializer memorypack

Godot starter

Use this when the game client is a Godot 4.x .NET project.

lakona-tool new --name MyGame --client-engine godot --transport kcp --serializer memorypack

Generated workspace

Every starter keeps shared contracts, stable server code, hotfixable behavior, and the selected game client in one local workspace.

MyGame/
  Shared/        RPC contracts, DTOs, callbacks, shared protocol types
  Server/
    App/         Stable host, actors, lifecycle handlers, configuration
    Hotfix/      Replaceable gameplay behavior
  Client/        Unity or Godot client project

Build the Server

Move into the generated project and build the server solution first:

First command inside the new project
cd MyGame
dotnet build "Server/Server.slnx"

This is the first command to run inside a new Lakona project. It ensures both the stable server host and the hotfix project compile before you ask the server to inspect its runtime configuration.

After changing Shared/ or Server/Hotfix/, rebuild the hotfix project to refresh the development hotfix output used by the running server:

Refresh local hotfix output
dotnet build "Server/Hotfix/Server.Hotfix.csproj"

Start the Server

After the server solution and hotfix output build, start the server:

Start the local server
dotnet run --project "Server/App/Server.App.csproj" --no-build

The default endpoint listens on 127.0.0.1:20000. WebSocket projects use ws://127.0.0.1:20000/ws; TCP and KCP projects use their selected transport on port 20000.

Check Readiness

With the server running, request the readiness endpoint from another terminal:

Inspect generated runtime state
curl http://127.0.0.1:20080/_lakona/health/ready

The readiness response contains JSON guardrail diagnostics when configuration, hotfix output, endpoints, or observability settings are not ready. Liveness is available at http://127.0.0.1:20080/_lakona/health/live.

Run the Client

Unity first launch

Open the generated Client/ project in Unity 2022 LTS and let NuGetForUnity restore the packages from Client/Assets/packages.config.

Package restore

If Unity is still compiling or restoring packages, wait for the restore to finish before running the generated login scene. Reopen the project only if Unity asks for a reload after package import.

Godot first launch

Open the generated Client/ project in Godot and run the generated login scene.

That gives you the shortest end-to-end path: generated shared contracts, running server, selected transport, and a client connecting to the local endpoint.

What to Edit First

Start with the generated vertical slice, then change one layer at a time.

Shared/Contracts/

Change RPC contracts, callbacks, DTOs, and shared stable types.

Server/Hotfix/

Change gameplay rules or service behavior that should be replaceable.

Server/App/

Change stable orchestration, actor state, host binding, or configuration.

Client/

Change the selected engine UI and client session flow.

Check /_lakona/health/ready again after changing runtime configuration. It is the fastest way to catch missing endpoints, invalid service exposure, and unsafe server startup state before the game reaches players.

Shared contracts

Server and client compile the same API surface.

Server and hotfix built

The stable host and replaceable gameplay assembly are ready.

Client ready to connect

Unity or Godot can point at the local Lakona endpoint.