Unity client for Nakama server.
Clone or download
Pull request Compare This branch is 7 commits ahead, 16 commits behind heroiclabs:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Nakama.Tests
Nakama
docs
example
packages
server @ b6f073b
.gitignore
.gitmodules
CHANGELOG.md
Doxyfile
LICENSE
Nakama.sln
README.md
RELEASEINST.md
build.gradle
link.xml
rpc.lua

README.md

Nakama Unity

Unity client for Nakama server.

Nakama is an open-source distributed server for social and realtime games. For more information have a look at the server documentation; and for a quick list of build targets run gradle tasks.

The client guide is available on the server documentation. The client reference documentation is deployed on gh-pages.

If you encounter any issues with the server you can generate diagnostics for us with nakama doctor. Send these to support@heroiclabs.com or open an issue. If you experience any issues with the client, it can be useful to enable trace (.Trace(true)) to produce logs and open an issue.

### Start client

You can download the client directly from the Asset Store.

Have a look at the quickstart guide for a full introduction on how to get started with the client in development and/or production.

To create a client and connect to the Nakama server with the default settings:

using UnityEngine;
using System.Collections;
using Nakama;

public class NewBehaviourScript : MonoBehaviour {
  void Start() {
    INClient client = NClient.Default("defaultkey");
  }

  void Update() {
  }
}

Build Settings for Android

Nakama Unity Client requires the full .Net 2.0 runtime. In Unity Build Settings window, change API Compatibility Level to .Net 2.0.

In addition to above, you'll need to change Stripping Level to either "Disabled" or "Strip Assemblies". Alternatively you can add the link.xml to the Assets folder of your project which configures how the Linker strips down the generated code.

Build Settings for iOS

Nakama Unity Client requires the full .Net 2.0 runtime. In Unity Build Settings window, change API Compatibility Level to .Net 2.0.

Contribute

To build the codebase you will need to install these dependencies:

  • unity The Unity editor/compiler toolchain.
  • gradle A JVM-based build tool.
  • protobuf A toolchain used to create custom protocols.
  • doxygen A tool for generating documentation from annotated source.

You can then install code dependencies:

$> gradle nugetRestore

For development use the compile and test run cycle:

$> gradle nunit

To package a release use:

$> gradle unityPackage

Credits

The generated documentation theme is based on the work of @Velron.