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.

1. Callback setting

In order to communicate with the PC SDK using the popup API, the game must define a delegate function to connect to the callback of the StovePCCallback class below.

  public class StovePCCallback
{
     public StovePCErrorDelegate OnError;
     public StovePCInitializationCompleteDelegate OnInitializationComplete;
     public StovePCTokenDelegate OnToken;
     public StovePCUserDelegate OnUser;
     public StovePCOwnershipDelegate OnOwnership;

     // Callback called when GetAutopopup processing is complete
     public StovePCAutoPopupDelegate OnAutoPopup;

     // Callback called when GetManualPopup processing is complete
     public StovePCManualPopupDelegate OnManualPopup;

     // Callback called when GetNewsPopup processing is complete
     public StovePCNewsPopupDelegate OnNewsPopup;

     // Callback called when GetCouponPopup processing is complete
     public StovePCCouponPopupDelegate OnCouponPopup;

     // Callback called when GetCommunityPopup processing is complete
     public StovePCcommunityPopupDelegate OnCommunityPopup;
}

Connect the delegate to the callback of the StovePCCallback class as in Integrating 2) Config, Callbak Settings.

// Create StovePCCallback class instance
this.callback = new StovePCCallback
{
     OnError = new StovePCErrorDelegate(this.OnError),
     OnInitializationComplete = new StovePCInitializationCompleteDelegate(this.OnInitializationComplete),
     OnToken = new StovePCTokenDelegate(this.OnToken),
     OnUser = new StovePCUserDelegate(this.OnUser),
     OnOwnership = new StovePCOwnershipDelegate(this.OnOwnership),

     // pop-up
     OnAutoPopup = new StovePCAutoPopupDelegate(this.OnAutoPopup),
     OnManualPopup = new StovePCManualPopupDelegate(this.OnManualPopup),
     OnNewsPopup = new StovePCNewsPopupDelegate(this.OnNewsPopup),
     OnCouponPopup = new StovePCCouponPopupDelegate(this.OnCouponPopup),
     OnCommunityPopup = new StovePCCommunityPopupDelegate(this.OnCommunityPopup)
};

You are not required to implement the OnAutoPopupOnManualPopupOnNewsPopupOnCouponPopupOnCommunityPopup callbacks.

You only need to implement and connect the necessary callback functions according to the pop-up used in the game.

2. Game profile settings

Set game world and character information with StovePC.SetGameProfile 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.