This repository contains a plugin project for Flax Engine games with Epic Online Services (EOS) online platform implementation that covers: user profile, friends list, online presence, achevements, cloud savegames and more.
Minimum supported Flax version: 1.3
.
-
Clone repo into
<game-project>\Plugins\OnlinePlatformEOS
-
Add reference to OnlinePlatformEOS project in your game by modyfying
<game-project>.flaxproj
as follows:
...
"References": [
{
"Name": "$(EnginePath)/Flax.flaxproj"
},
{
"Name": "$(ProjectPath)/Plugins/OnlinePlatformEOS/OnlinePlatformEOS.flaxproj"
}
]
- Add reference to the EOS plugin module in you game code module by modyfying
Source/Game/Game.Build.cs
as follows (or any other game modules using Online):
/// <inheritdoc />
public override void Setup(BuildOptions options)
{
base.Setup(options);
...
switch (options.Platform.Target)
{
case TargetPlatform.Windows:
case TargetPlatform.Linux:
case TargetPlatform.Mac:
options.PublicDependencies.Add("OnlinePlatformEOS");
break;
}
}
This will add reference to OnlinePlatformEOS
module on Windows/Linux/Mac platforms that are supported by Steam.
- Test it out!
Finally you can use EOS as online platform in your game:
// C#
using FlaxEngine.Online;
using FlaxEngine.Online.EOS;
var platform = new OnlinePlatformEOS();
Online.Initialize(platform);
// C++
#include "Engine/Online/Online.h"
#include "OnlinePlatformEOS/OnlinePlatformEOS.h"
auto platform = New<OnlinePlatformEOS>();
Online::Initialize(platform);
Then use Online system to access online platform (user profile, friends, achievements, cloud saves, etc.).
- Setup settings
This plugin ais released under MIT License.