The PC SDK provides APIs to integrate popups into your game. Pop-ups supported by PC SDK include automatic, manual, news, coupon, and community.
The PC SDK provides data for popups to the game. The game creates a pop-up view using the provided data.
Each popup is defined as follows.
In order to use the PC SDK popup API, the metadata registration of the popup integrated with Partners must be preceded.
To communicate with the PC SDK using the pop-up API, the game must override the callback function defined in the UStoveSDKObject
class below.
{
//StovePCSDK Callback
public:
void OnError(FStoveError Error) final;
void OnInitComplete() final;
void OnToken(FStoveToken Token) final;
void OnUser(FStoveUser User) final;
void OnOwnership(int Size, FStoveOwnership* Ownerships) final;
}
You are not required to implement the OnAutoPopup
, OnManualPopup
, OnNewsPopup
, OnCouponPopup
, OnCommunityPopup
callbacks.
You only need to implement and connect the necessary callback functions according to the pop-up used in the game.
/*As for when only using the Ownership function,
apart from the essential callbacks OnError, OnInitcomplte,
connect only the OnOwnership callback additionally.*/
void UMyStoveSDKObject::OnInitComplete()
{
// Process details after successful initialization
}
void UMyStoveSDKObject::OnError(FStoveError fError)
{
// Process details of the error
}
void UMyStoveSDKObject::OnOwnership(int size, FStoveOwnership* fOwnership)
{
// Process details after ownership has been viewed
}
Set game world and character information with UMyStoveSDKObject::StoveSDKSetGameProfile
function.
Set information is used in pop-ups, so it must be set before using pop-ups.
The validity of the game profile is not checked separately. Therefore, you must enter the correct value by proceeding with validation (null) when entering.
The entered game profile is only valid for the life cycle of PCSDK.
That is, whenever PCSDK is initialized, the game world and character information must be set by calling the UMyStoveSDKObject::StoveSDKSetGameProfile
function.