Installation Guide

Install GONet

Get multiplayer networking running in your Unity project in minutes.

Prerequisites

Unity 2022 LTS or later

GONet v1.3 and earlier: Unity 2021.3.26+. GONet v1.2 and earlier: Unity 2018.3+.

Enable unsafe code

Navigate to Edit → Project Settings → Player → Allow 'unsafe' Code and enable the checkbox.

Set .NET API compatibility

In the same Player settings, set the Api Compatibility Level to .NET 4.x.

Optional: Logging define symbols

For detailed logging during development, add the following Scripting Define Symbols:

LOG_DEBUG;LOG_INFO;LOG_WARNING;LOG_ERROR;LOG_FATAL

Installation Steps

1

Get GONet from the Unity Asset Store

Download the GONet package from the Unity Asset Store and add it to your project.

2

Import the package

Import the GONet package into your Unity project and allow automatic compilation to complete. Unity will process the scripts and generate the necessary files.

3

Add the GONet prefab to your scene

Add the GONet_GlobalContext prefab to your startup scene. You can find it at:

Assets/GONet/Resources/GONet/GONet_GlobalContext.prefab

Alternatively, use the included sample scene to get started quickly:

Assets/GONet/Sample/GONetSampleScene.unity
4

Test in the editor

Press Play in the Unity Editor, then use the keyboard shortcuts to spawn instances:

Alt + S

Spawn server instance

Alt + C

Spawn client instance

Build Deployment

Windows

  1. 1.Copy Start_CLIENT.bat and Start_SERVER.bat from /Assets/StreamingAssets/GONet to your build output directory.
  2. 2.Update the references inside each .bat file to match your executable name.
  3. 3.Run Start_SERVER.bat first, then run Start_CLIENT.bat to connect.

Other Platforms

Launch two instances of your built application. In the first instance, press Alt + S to start the server. In the second instance, press Alt + C to connect as a client.

Next Steps

GONet is installed and running. Now learn how to build with it.

GONet v1.5 (Free) disclosure

GONet v1.5 (free) includes a legacy license/EULA remittance mechanism that may transmit a local GONet-generated file to unitygo.net. This behavior is not present in GONet Legendary (v1.6+), the paid version available on the Unity Asset Store.

Install | GONet