Ultra's Unreal online subsystem which allows developers to connect the Ultra client to Unreal-based games.
- Add this plugin to your project
YourProjectName/Plugins/OnlineSubsystemUltra
- Start Unreal Editor
- Go to
Edit / Plugins
- Search
OnlineSubsystemUltra
- Enable the plugin
- Setup OnlineSubsystemUltra in DefaultEngine.ini (see Configuration for more details)
You'll need a client_id
for this. To get one, you can request one directly from Ultra.
To configure Ultra's Unreal Online Subsystem, you need to edit the DefaultEngine.ini:
[OnlineSubsystem]
DefaultPlatformService=Ultra ; Set OnlineSubsystemUltra as default online subsystem
[OnlineSubsystemUltra]
bEnabled=true
; Authentication
ClientId="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" ; Mandatory - The Client Id given by Ultra
DispatcherUrl="https://api.ultracloud.ultra.io/dispatcherv2" ; Optional - The dispatcher URL (default: https://api.ultracloud.ultra.io/dispatcherv2)
AuthenticationUrl="https://auth.ultra.io/auth/realms/ultraio/protocol/openid-connect" ; Optional - The openid authentication URL (default: https://auth.ultra.io/auth/realms/ultraio/protocol/openid-connect)
bUseBrowser=false ; Optional - If true, the browser will be launched to prompt the user credentials otherwise the 'ApplicationProtocol' will be used to handle the login (default: false)
ApplicationProtocol=ultra ; Optional - If set to "ultra", the Ultra launcher will be called to login the user (default: ultra)
const IOnlineIdentityPtr IdentityInterface = Online->GetIdentityInterface();
FDelegateHandle Handle;
IdentityInterface->AddOnLoginCompleteDelegate_Handle(UserIndex, FOnLoginCompleteDelegate::CreateLambda([IdentityInterface, Handle](int32 LocalUserNum, bool Success, const FUniqueNetId& UserId, const FString& Error)
{
IdentityInterface->ClearOnLoginCompleteDelegate_Handle(LocalUserNum, Handle);
FString Nickname = IdentityInterface->GetPlayerNickname(LocalUserNum);
// do something
}));
IdentityInterface->AutoLogin(UserIndex);