Skip to main content

Showing the friends overlay

You can use the external UI interface to show the friends overlay to the user. If they're signed into an Epic Games account, they'll see the Epic Games friends list. If they're not signed into Epic Games, but are playing on Steam or a console platform, they'll be presented with the native platform's friends list.

Configuring the external UI for the local platform on PC

On mobile and console platforms, this is already done for you. However on PC, you'll need to tell Unreal Engine which store your build is for, so that the external UI calls get routed correctly.

If you're shipping on Steam, you should set the following entry in DefaultEngine.ini:

[OnlineSubsystem]
NativePlatformService=Steam
caution

If you don't have a NativePlatformService set, you'll only be able to call ShowFriendsUI when the user is signed into an Epic Games account. All other external UI operations will fail.

Showing the friends overlay

To show the friends overlay, first get the external UI interface:

#include "OnlineSubsystem.h"
#include "OnlineSubsystemUtils.h"
#include "Interfaces/OnlineExternalUIInterface.h"

// ...

IOnlineSubsystem* Subsystem = Online::GetSubsystem(this->GetWorld());
IOnlineExternalUIPtr ExternalUI = Subsystem->GetExternalUIInterface();

Then, open the friends UI for the local user:

ExternalUI->ShowFriendsUI(0 /* The controller index of the local user */);