The eos_plugin_for_unity repository contains the source code for development and support of the Epic Online Services Plugin for Unity (UPM Package) package.
Things this plugin provides:
- Unity GUI for configuring EOS settings and saving to a JSON file
- Unity editor playback support, handled by reloading EOS SDK
- Feature specific manager classes for most common use-cases of EOS SDK API
- Feature specific samples as Unity scenes
- Social Overlay support
- Targets [EOS SDK 1.14.2-hf-1] (https://dev.epicgames.com/docs/services/en-US/WhatsNew/index.html#1.14.2-hf-1_hotfix_-feb.14,2022) (bundled with plugin)
- Targets Unity 2020.1
This repo contains:
- A Unity Project for development of feature managers and samples
- Native Source for
DynamicLibraryLoaderHelper
- Native Source for
GfxPluginNativeRender
- Tool to build a Unity Package Manager compatible UPM
The follow target platforms are supported in Unity for the current release of the plugin.
Unity Target Platform | Current Plugin Release |
---|---|
Unity Editor | Supported (No Social Overlay) |
Windows Standalone x64 | Supported |
Windows Standalone x86 | Supported |
Universal Windows Platform x64 | Supported |
Android | Future |
iOS | Future |
Linux | Future |
MacOS | Future |
Console Platforms | Future |
WebGL | Not Supported |
Universal Windows Platform x86 | Not Supported |
Unity Web Player | Not Supported |
The EOS SDK is continually releasing new features and functionality. The following is a list of EOS features and their support level for the Unity plugin.
EOS Feature | Included in Sample |
---|---|
Achievements | Achievements Sample |
Authentication | - All Samples - |
Ecommerce | Store Sample |
Friends | Auth & Friends Sample |
Leaderboards | Leaderboards Sample |
Lobby | Lobbies Sample |
Lobby with Voice | Lobbies Sample |
NAT P2P | P2P Sample |
Player Data Storage | Player Data Storage Sample |
Presence | Auth & Friends Sample |
Sessions | Sessions Sample |
Social Overlay | - All Samples - |
Stats | Leaderboards Sample |
Title Storage | Title Storage Sample |
Reports | Player Reports & Sanctions Sample |
Sanctions | Player Reports & Sanctions Sample |
Anti-Cheat | Not Supported |
EOS Mod SDK | Not Supported |
Voice Trusted Server | Not Supported |
For best results, Unity 2020 is preferred.
Ensure you have property setup Unity for Git Dependency.
-
Make sure you have git and git-lfs installed
-
Open the Unity Editor
-
Open the Package Manager.
- It's listed under
Window -> Package Manager
- It's listed under
-
Click the
+
button -
Select '
Add Package from Git URL
' -
Paste in
git@github.com:PlayEveryWare/eos_plugin_for_unity_upm.git
orhttps://github.com/PlayEveryWare/eos_plugin_for_unity_upm.git
Download the latest release tarball from https://github.com/PlayEveryWare/eos_plugin_for_unity/releases
-
From the Unity Editor, open the Package Manager
- It's listed under
Window -> Package Manager
- It's listed under
-
Click the
+
button -
Select '
Add package from tarball
' -
Go to directory containing the PEW Unity plugin tarball, and select it
-
Click
Open
To get the EOS working, the plugin needs to know some specific things about your EOS project.
- One has a Unity project one would like to have the plugin integrated into
- One has a Epic Games Account, which you may sign up for here
- One has accepted the Terms for the Epic Online Services
- One has configured a product on the Epic Games Developer Portal
-
Open your Unity project with integrated plugin
-
In the Unity editor, Open
Tools -> EpicOnlineServicesConfigEditor
-
Configure the EOS plugin
-
From the developer portal, copy the configuration values listed below, and paste them into the similarly named fields in the editor tool:
- ProductName
- ProductVersion
- ProductID
- SandboxID
- DeploymentID
- ClientSecret
- ClientID
- EncryptionKey
At this point, you are ready to start developing using the Epic Online Services Plugin for Unity! Simply attach EOSManager.cs (Script)
to a Unity object and it will intialize the plugin with the specified configuration in OnAwake()
.
If you would like to see examples of each feature, continue installing samples below.
The included samples show fully functional feature implemenation that will both help with EOS integration as well as validate client to dev portal configuration. After installing the samples from the UPM package, you will find scenes for each major feature.
In addition, the samples include Unity friendly feature Managers that can help to quickly integrate new EOS features into your title. They provide functional usage of the main feature functionality and can be a good base template.
To use the samples, install them from the UPM manager.
The samples include both usage of the EOS SDK, and convience wrappers to make using the SDK more ergonomic in the Unity Game Engine. By being samples in the UPM sense, they are placed under Assets which allows modification.
-
Launch Unity project with the samples installed
-
In the Unity editor, hit
Play
-
Login with a selected authentication type
-
Launch the Developer Authentication Tool
-
Pick a port to use on the computer. 8888 is a good quick to type number that isn't usually used by a process
-
Log in with one's user credentials that are registered with Epic
-
Pick a username. This username will be used in the sample to log in
More specific and up-to-date instructions can also be found on Epic's website
EOS Plugin for Unity API Documentation can be found at https://eospluginforunity.playeveryware.com
For issues related to integration or usage of the Unity plugin, please create a New Issue
under the Issues tab.
For issues related to Epic Online Services SDK, Epic Dev Portal or general EOS SDK information, please go to Epic Online Services Community Support
Detailed descriptions and usage for EOS SDK Interfaces, can be found at EOS Developer Documentation: Game Services.
The following are guidlines for helping contribute to this open source project.
- Ensure At least Visual Studio 2017 is installed.
- Ensure At least Unity 2020.1.11f1 is installed
- Ensure required Platform SDKs are installed (Windows, Linux, macOS, Android, iOS, Consoles)
- Build the Visual Studio solutions for the native DLLs
- Build the
DynamicLibraryLoaderHelper
sln in DynamicLibraryLoaderHelper/ for all platforms - (Currently needed) Build the UnityEditorSharedDictionary sln in UnityEditorSharedDictionary/ for all platforms
- Only the NativeSharedDictionary project is needed.
- Build the
A successful build will mean the correct binaries have been placed in the proper locations for Unity to successfully initialize EOS SDK.
See standards.md
Additional documentation can be found in the docs/ directory.