SDK Unity Plugin
Version: v0.9 (Beta)
All v1.0 features are complete and ready for integration and use. Customer iteration will determine any final changes before labelling as v1.0.
Overview
The Plugin provides multiple components to interact with the i3D ONE Platform.
- Arcus is the library that provides communication between the Game Server and the scaling environment in the One Platform. It is to be integrated into the Game Server. It contains a C/C++ implementation of the ONE platform's Arcus protocol and messages, and provides a TCP server to communicate with the ONE Platform.
- Ping is a library that provides a way to obtain server addresses of the ONE backend and utilities to ping the servers, for use in a game's player client code's matchmaking features.
Arcus Component
The plugin provides Unity game servers with the ability to communicate over TCP with the i3D.net ONE Platform, for easy and efficient scaling of game servers.
- Integration guide - How to integrate the plugin into a game server.
- Package export - How to create a new package.
The i3D.net Game Hosting SDK works on Windows and Linux. If you need further assistance after reading this guide, please file an issue.
Supported platforms:
- Windows 10 Pro
- Ubuntu 18.04
Requirements
- Minimum compatible Unity version: 2017.4.40f1.
- Native SDK libraries require C++ Redistributable 2017 to be installed on Windows. Download the installer and follow its instructions:
- Docker (Optional for developers building C++ Shared Libraries).
Integration guide
- Simply download the Unity package from the online repository.
- In Unity Editor, go to Assets > Import Package > Custom Package... menu.
- Select the package from step 1 and click Open.
- In the opened window, click Import.
- Add OneServer component to a scene that is loaded before online gameplay starts.
- The component is marked as DontDestroyOnLoad, so the object it's attached to will persist on scene transitions, maintaining the Arcus Server from that point forward.
- For game servers that host multiple gaming sessions on a single process, each session should have its own
OneServer
.
- Refer to the [example game] (https://github.com/i3D-net/ONE-GameHosting-SDK-Unity/tree/master/ONE%20SDK%20Plugin/Assets/Plugins/i3D/Example) on how to set up and use the component.
- Follow the next task: How to test below.
How to test
There are two ways to test a Game Server that is running an Arcus Server:
- The SDK contains a Fake Agent that can connect and simulate a real deployment. Build and run instructions can be found here.
- The Game Server can be uploaded to a live One Development Platform Deployment.
Testing can be performed either in Unity Editor or on a build running in headless mode.
Ping Component
The plugin provides Unity game servers with the ability ping and gather ping statistics for i3D
ONE Platform servers.
- Integration guide - How to integrate the plugin into a game server.
- Sample game - An example of how to use the plugin.
- Package export - How to create a new package.
The i3D.net Game Hosting SDK works on Windows and Linux. If you need further assistance after reading this guide, please file an issue.
Supported platforms: - Windows 10 Pro - Ubuntu 18.04
Requirements
- Minimum compatible Unity version: 2017.4.40f1.
- Native SDK libraries require C++ Redistributable 2017 to be installed on Windows. Download the installer and follow its instructions:
- Docker (Optional for developers building C++ Shared Libraries).
Ping component integration guide
- Simply download the Unity package from the online repository.
- In Unity Editor, go to Assets > Import Package > Custom Package... menu.
- Select the package from step 1 and click Open.
- In the opened window, click Import.
- Follow the next task How to test below
How to test
The example ping can be used standalone to test. The example ping will fetch the i3D
sites information and start pinging the different sites.
Testing can be performed in Unity Editor.
SDK native libraries
Optional - for developers that need to recompile the C++ source used by the plugin.
The libraries are built using the SDK source code.
build_sdk_dlls.bat can be used to build all necessary native assemblies on Windows. Docker must be installed (see Requirements). build_client_sdk_dlls.bat can be used to build all necessary native assemblies on Windows. Docker must be installed (see Requirements).
For example:
build_sdk_dlls.bat C:\path_to_sdk
build_client_sdk_dlls.bat C:\path_to_sdk
Package export
Optional - for developers that need to rebuild and repackage the plugin.
Consider potential Unity Version conflicts - ensure the package is built with the lowest Unity Editor Version that your users will be using.
Steps:
- Close the project in the Editor (if opened). This is needed to unload the SDK libraries.
- Update the native SDK libraries if needed. The easiest way is to use build_dlls.bat script. Alternatively, they can be rebuilt manually by following the instructions in the SDK repository.
- Open the project. Upgrade the project to match required Unity version, if needed.
- Go to "Assets -> Export Package..." menu item.
- Make sure to select the "i3D" subfolder from the "Plugins" folder. All the other folders, if there are any, should be deselected.
- Click "Export..." and select the output path.