Getting Started
1. Preparation
Integrate
PGOS SDK
at firstCopy the plugin folders PGOSOverlay and INTLSDKPlugin into the directory
Plugins
of your game project.Regenerate the game project files with
Generate Visual Studio project files
in the context menu of the.uproject
fileAdd the modules
PgosWeaver
andPgosWeaverINTL
as dependencies into{YourGameProjectName}.Build.cs
PrivateDependencyModuleNames.AddRange(new [] { "PgosWeaver", "PgosWeaverINTL" });
1.1 Configure the Account Provider
Currently, we support INTL account. You may need to register a developer account if you don't have one. Check the following links for more details:
1.2 Configure INTL SDK
Follow the configuration guide of INTL SDK to modify the INTL config file with your developer account (
Plugins\INTLSDKPlugin\Source\INTLSDKPlugin\INTLSDK\resources\INTLConfig.ini
)Also, we provide a more convenient way to configurate the SDK via the UE4 Editor. In the Editor, navigate to Settings->Project Settings->Plugins->PgosWeaver, and you can see the settings as below:
- Add any Key-Value pairs to
Variables
underINTL Settings
section. The plugin will automatically overwrite those configurations inINTLConfig.ini
when the game is launched.
- Add any Key-Value pairs to
2. Initialization
Before starting logging in, title_region_id
is required to set with SetOverlayConfig
.
Copy
title_region_id
from PGOS Web PortalCall
SetOverlayConfig
before logging inwith Blueprint
with C++
UPgosBlueprintFunctionLibrary::SetOverlayConfig(EPgosOverlayConfigKey::TitleRegionId, TEXT("your_title_region_id_here"));
3. Logging in
❗ Note: Refer to this page for further information.
4. Visibility Control
You can change the visibility of PGOS Overlay
through SetOverlayVisibility()
:
It's also available in C++:
// set Overlay visibility
UPgosBlueprintFunctionLibrary::SetOverlayVisibility(bVisible);
// get Overlay visibility
bool bVisible = UPgosBlueprintFunctionLibrary::GetOverlayVisibility();
4.1 Callback for Visibility Change
If you want to get notified once the visibility of Overlay is changed, you can register a callback:
UPgosWidgetManager* WidgetManager = UPgosBlueprintFunctionLibrary::GetOverlayWidgetManager();
WidgetManager->OnOverlayVisibilityChanged.AddUObject(...);