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, stable shared 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.

Validate the Runtime Configuration

After the server solution builds, run the check command:

Inspect generated runtime state
dotnet run --project "Server/App/Server.App.csproj" -- --readiness-check

The check prints the derived Lakona runtime state: cluster defaults, hotfix setup, reliable push setup, endpoints, and exposed RPC services. Run it after project generation and again after editing configuration.

Run the Server

After the check succeeds, 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.

Run the Client

Unity first launch

Open the generated Client/ project in Unity. If Unity shows an error dialog during the first import, click Ignore and continue into the Editor.

Known first-launch issue

Because of current source generator behavior, the Unity project may not run correctly immediately after the first import. Close Unity, open Client/ again, and then run the generated login scene.

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.

Run --readiness-check 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.