An Epic Online Services (EOS) implementation for Fish-Networking.
Thank ETdoFresh with your support.
If you have further questions, come find us in the FirstGearGames Discord!
- Fish-Networking https://github.com/FirstGearGames/FishNet
- PlayEveryWare/eos_plugin_for_unity https://github.com/PlayEveryWare/eos_plugin_for_unity
- Use
git clone https://github.com/PlayEveryWare/eos_plugin_for_unity
when downloading eos_plugin_for_unity. If you download as zip, you may have errors with the included DLLs. - Copy Assets/Plugins from repository to your project's Assets/Plugins folder.
- Requires Unity 2020.1.11f1 or newer.
- Requires Unity Package:
com.unity.editorcoroutines
- Configure the plugin with your Epic Online Services project information.
- Use
- Open Unity Package Manager. Unity > Window > Package Manager
- Add a package from git URL. Package Manager > + > Add package from git URL...
- Enter this url:
https://github.com/ETdoFresh/FishyEOS.git?path=/FishNet/Plugins/FishyEOS
After installing FishNet, download this repository directly to your Assets folder.
Copy the FishNet/Plugins/FishyEOS folder to your Packages folder.
- Add FishyEOS Transport component to NetworkManager GameObject.
- Set transport variable on the TransportManager Component to FishyEOS.
- Specify the EOS SocketName which you would like to listen from.
ExampleFishyEOS
- Start Server as normal.
NetworkManager.ServerManager.StartConnection()
- Specify the EOS SocketName which you would like to connect.
ExampleFishyEOS
- Specify the ServerProductUserId which you would like to connect.
Example0002780586644887316944b9a41246b3
- Start Client as normal.
NetworkManager.ClientManager.StartConnection()
- Follow steps from As a Server.
- Start Client as normal.
NetworkManager.ClientManager.StartConnection()
(A special "clientHost" will be created on server allowing to play as a client on the server)
EOS has limitations which prevent you from connecting to yourself using the same ID. To do so, you must have two Epic Connect Product User IDs. You can use the same device to log into both if they are different sign in providers (I often use Developer and DeviceCode).
FishyEOS relies on the PlayEveryWare/eos_plugin_for_unity plugin to function. The code provided in this repository only uses the calls from this plugin to function. Please refer to the plugin's documentation for supported platforms.
As of PlayEveryWare/eos_plugin_for_unity@2.1.5. Android, IOS, and MacOS support is in preview. However, I had to make some changes to the plugin to get it to work on these preview platforms. Here are those changes:
- For all non-windows platforms, set the following Edit > Project Settings > Player Settings > Other Settings
- Add
EOS_PREVIEW_PLATFORM
to the list. - Press the Apply button.
- Add
- For Android specifically, also set the following Edit > Project Settings > Player Settings
- Other Settings > Identification > Minimum API Level = 23 or higher
- Publishing Settings > Uncheck Custom Main Gradle Template
- If prompter to update gradeTemplate.properties, click Yes.
- Do not add EOSManager to your scene.
- Instead only rely on FishyEOS provided
EOS.GetManager()
andEOS.GetPlatformInterface()
. - These functions detect if you are on windows and calls platform specific initialization function.
- Instead only rely on FishyEOS provided
- If you have your EOS configured, you will have a config file located in Assets/StreamingAssets/EOS/EpicOnlineServicesConfig.json
- For Android, Duplicate Assets/StreamingAssets/EOS/
EpicOnlineServicesConfig.json
toeos_android_config.json
- For MacOS, Duplicate Assets/StreamingAssets/EOS/
EpicOnlineServicesConfig.json
toeos_macos_config.json
- For Android, Duplicate Assets/StreamingAssets/EOS/
- Android Builds require Android Build Tools 30.0.3. If you are using Unity 2020, you probably will need to update your build tools. (Otherwise, I think you are fine?)
rem Run an administrator privledged command prompt/terminal cd \Program Files\Unity\Hub\Editor\2020.3.33f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\bin sdkmanager.bat --install build-tools;30.0.3
- If you are trying to use MacOS preview on M1, here's how I got it to work: PlayEveryWare/eos_plugin_for_unity#141 (comment)