This plugin has been tested, and supports Unity versions 2021.3.0f1+, including all LTS releases, and Unity 6.
This plugin is intended to simplify integration of Gen2 Matchmaking through pre-defined set of SDK methods and example client & server runtime handler scripts.
- Installing our plugin this way will ensure you get the freshest updates the moment they come out, see the update guide.
- Requirement: functioning git client installed, for example git-scm.
- Open your Unity project,
- Select toolbar option Window -> Package Manager,
- Click the + icon and select Add package from git URL...,
- Input the following URL
https://github.com/edgegap/edgegap-unity-gen2-sdk.git
, - Click Add and wait for the Unity Package Manager to complete the installation.
- Slightly easier as no git client is required.
- Installing our plugin this way will require you to manually replace plugin contents if you wish to update it,
- The newtonsoft package (dependency) version required may not be compatible with your project if you're already using an older version of this package.
- Select toolbar option Window -> Package Manager,
- Click the + icon and select Add package by name...,
- Input the name
com.unity.nuget.newtonsoft-json
and wait for the Unity Package Manager to complete the installation., - Back to this github project - make sure you're on the
main
branch, - Click <> Code, then Download ZIP,
- Paste the contents of the unzipped archive in your
Assets
folder within Unity project root.
This is the only official distribution channel for this SDK, do not trust unverified sources!
Follow our Getting Started guide first, then explore our Matchmaking Scenarios for inspiration.
- Find this package in Unity Package Manager window.
- Open the
Samples
tab. - Click on Import next to Gen2 Simple Example.
- Locate sample files in your project
Assets/Samples/Edgegap Gen2 SDK/{version}/Simple Example
. - Create an Empty GameObject in your scene and attach
Gen2ClientHandlerExample.cs
script. - Configure Gen2
BaseUrl
andAuthToken
values from dashboard.
To take full advantage of our Unity Gen2 service, you will need to Create an Edgegap Free Tier account. Our Free Tier let's you test and explore all of Gen2 features for free, no credit card required!
Unity Editor shows
[Package Manager Window] Error adding package: https://github.com/edgegap/edgegap-unity-gen2-sdk.git
- If you’re adding our plugin via git URL, you will need to have a git client installed.
Unity Editor 2021 shows
failed to resolve assembly: 'Edgegap.Gen2.SDK...
- This is a known issue when using plugin with Unity's Burst compiler.
- Install plugin via ZIP archive and delete
EdgegapGen2SDK.asmdef
in the plugin folder to resolve this.
Visual Studio shows
type or namespace name could not be found
for Edgegap namespace.
- In your Unity Editor, navigate to Edit / Preferences / External Tools / Generate .csproj files.
- Make sure you have enabled Git packages.
- Click Regenerate project files.
Before updating, take note of your Client Version
property on Gen2Client.cs
to ensure future compatibility.
Depending on your installation method:
- If you installed with git, locate it in Unity's Package Manager window and click Update. Wait for the process to complete and you're good to go!
- If you installed via ZIP archive, you will need to remove the previous copy, then download the new version.
-
Replace any missing scripts in your scenes!
- Verify validity of your
Gen2Client.cs
properties likeBaseUrl
andAuthToken
.
- Verify validity of your
-
Increase
Client Version
property value of yourGen2Client.cs
script!- This will prevent loading outdated tickets from cache when matchmaking resumed.
-
You may want to modify your client & server handler scripts.
This section is only for developers working on this plugin or other plugins interacting / integrating this plugin.
This project uses CSharpier code formatter to ensure consistent and readable formatting, configured in /.config/dotnet-tools.json
.
See Editor integration for Visual Studio extensions, optionally configure Reformat with CSharpier
on Save under Tools | Options | CSharpier | General. You may also configure running formatting as a pre-commit git hook.