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.
•
Automatic pop-up: Pop-up that is most exposed on the game lobby screen and shows advertisements and events
•
Manual pop-up: Pop-up showing registered events corresponding to the resource key -News pop-up: A pop-up that collects and shows announcement posts at once
•
Coupon pop-up: Pop-up showing the coupon registration page
•
Community popup: Popup showing the game community page
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;
}
Plain Text
복사
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)
};
Plain Text
복사
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.
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.
The entered game profile is only valid for the life cycle of PCSDK. That is, every time PCSDK is initialized, StovePC.SetGameProfile function is called
You need to set the game world and character information.
// input parameters
// string worldId: the game's world identifier
// long characterNo: character identifier
StovePCResult result = StovePC.SetGameProfile("WORLD_ID", CHARACTER_NO);
if(result == StovePCResult.NoError)
{
// handle success
}
Plain Text
복사
3. Get automatic pop-up information
Search information about auto popup with StovePC.GetAutoPopup function.
StovePCResult result = StovePC.GetAutoPopup();
if(result == StovePCResult.NoError)
{
// handle success
}
Plain Text
복사
When the StovePC.GetAutoPopup function is successfully processed, the OnAutoPopup callback is called.
The StovePCAutoPopup structure passed to the callback contains the URL to the auto-popup.
The StovePCPopupRequestHeader structure passed to the callback contains name/value pairs of headers to be set when requesting URLs.
private void OnAutoPopup(StovePCAutoPopup[] autoPopups, StovePCPopupRequestHeader[] headers)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("OnAutoPopup");
sb.AppendFormat(" - autoPopups.Length : {0}" + Environment.NewLine, autoPopups.Length);
for (int i = 0; i < autoPopups.Length; i++)
{
sb.AppendFormat(" - autoPopups[{0}].Origin : {1}" + Environment.NewLine, i, autoPopups[i].Origin);
sb.AppendFormat(" - autoPopups[{0}].Id : {1}" + Environment.NewLine, i, autoPopups[i].Id.ToString());
sb.AppendFormat(" - autoPopups[{0}].Url : {1}" + Environment.NewLine, i, autoPopups[i].Url);
// ADD 2.6.0 start
sb.AppendFormat(" - autoPopups[{0}].Control.UI.Visible.CloseButton : {1}" + Environment.NewLine, i, autoPopups[i].Control.UI.Visible.CloseButton.ToString());
sb.AppendFormat(" - autoPopups[{0}].Control.UI.Visible.NavigationBar : {1}" + Environment.NewLine, i, autoPopups[i].Control.UI.Visible.NavigationBar.ToString());
sb.AppendFormat(" - autoPopups[{0}].Control.UI.Visible.BackButton : {1}" + Environment.NewLine, i, autoPopups[i].Control.UI.Visible.BackButton.ToString());
sb.AppendFormat(" - autoPopups[{0}].Control.UI.Visible.ForwardButton : {1}" + Environment.NewLine, i, autoPopups[i].Control.UI.Visible.ForwardButton.ToString());
sb.AppendFormat(" - autoPopups[{0}].Control.UI.Visible.RefreshButton : {1}" + Environment.NewLine, i, autoPopups[i].Control.UI.Visible.RefreshButton.ToString());
sb.AppendFormat(" - autoPopups[{0}].Control.UI.Visible.HomeButton : {1}" + Environment.NewLine, i, autoPopups[i].Control.UI.Visible.HomeButton.ToString());
sb.AppendFormat(" - autoPopups[{0}].Control.UI.Visible.DisallowedButton : {1}" + Environment.NewLine, i, autoPopups[i].Control.UI.Visible.DisallowedButton.ToString());
sb.AppendFormat(" - autoPopups[{0}].Control.UI.DisallowedDay : {1}" + Environment.NewLine, i, autoPopups[i].Control.UI.DisallowedDay.ToString());
sb.AppendFormat(" - autoPopups[{0}].Control.UI.CloseButtonImage.Normal.FileUrl : {1}" + Environment.NewLine, i, autoPopups[i].Control.UI.CloseButtonImage.Normal.FileUrl);
sb.AppendFormat(" - autoPopups[{0}].Control.UI.CloseButtonImage.Normal.FileId : {1}" + Environment.NewLine, i, autoPopups[i].Control.UI.CloseButtonImage.Normal.FileId);
sb.AppendFormat(" - autoPopups[{0}].Control.UI.CloseButtonImage.Pressed.FileUrl : {1}" + Environment.NewLine, i, autoPopups[i].Control.UI.CloseButtonImage.Pressed.FileUrl);
sb.AppendFormat(" - autoPopups[{0}].Control.UI.CloseButtonImage.Pressed.FileId : {1}" + Environment.NewLine, i, autoPopups[i].Control.UI.CloseButtonImage.Pressed.FileId);
sb.AppendFormat(" - autoPopups[{0}].Control.UI.CloseButtonImage.Type : {1}" + Environment.NewLine, i, autoPopups[i].Control.UI.CloseButtonImage.Type.ToString());
// 2.6.0 End
}
sb.AppendFormat(" - headers.Length : {0}" + Environment.NewLine, headers.Length);
for (int i = 0; i < headers.Length; i++)
{
sb.AppendFormat(" - headers[{0}].Name : {1}" + Environment.NewLine, i, headers[i].Name);
sb.AppendFormat(" - headers[{0}].Value : {1}", i, headers[i].Value);
if (i < headers.Length - 1)
sb. AppendFormat(Environment. NewLine);
}
Debug.Log(sb.ToString());
}
Plain Text
복사
Precautions
Even if the success callback (OnAutoPopup) is executed, the autoPopups callback parameter may be an empty array. Before using the autoPopups callback parameter, you should check the length of the array before deciding whether or not to display a popup. In this case, check Partners' automatic pop-up settings. The display order of auto popups must be the same as the order of autoPopups array elements. For example, if your autoPopups array contains three elements [A,B,C], you should expose popups in A, B, C order.
If an error occurs while running StovePC.GetAutoPopup, the OnError callback is called.
External errors can be checked through the ExternalError field of the StovePCError structure.
ExternalError | Description |
403000 | Invalid Access Error |
400000 | Wrong API usage Error |
400001 | Not Found Error |
400002 | Not Match Error |
400003 | Already exist |
500001 | Internal Interaction Error |
900000 | Unknown Service Error |
4. Obtain manual pop-up information
Search information about manual popup with StovePC.GetManualPopup function.
// input parameters
// string resourceKey: Manual pop-up identifier registered by Partners
StovePCResult result = StovePC.GetManualPopup("RESOURCE_KEY");
if(result == StovePCResult.NoError)
{
// handle success
}
Plain Text
복사
When the StovePC.GetManualPopup function is successfully processed, the OnManualPopup callback is called.
The StovePCManualPopup structure passed to the callback contains the URL to the manual popup.
The StovePCPopupRequestHeader structure passed to the callback contains name/value pairs of headers to be set when requesting URLs.
private void OnManualPopup(StovePCManualPopup[] manualPopups, StovePCPopupRequestHeader[] headers)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("OnManualPopup");
for (int i = 0; i < manualPopups.Length; i++)
{
sb.AppendFormat(" - manualPopups[{0}].Origin : {1}" + Environment.NewLine, i, manualPopups[i].Origin);
sb.AppendFormat(" - manualPopups[{0}].ResourceKey : {1}" + Environment.NewLine, i, manualPopups[i].ResourceKey);
sb.AppendFormat(" - manualPopups[{0}].Id : {1}" + Environment.NewLine, i, manualPopups[i].Id.ToString());
sb.AppendFormat(" - manualPopups[{0}].Url : {1}" + Environment.NewLine, i, manualPopups[i].Url);
// ADD 2.6.0 Start
sb.AppendFormat(" - manualPopups[{0}].Control.UI.Visible.CloseButton : {1}" + Environment.NewLine, i, manualPopups[i].Control.UI.Visible.CloseButton.ToString());
sb.AppendFormat(" - manualPopups[{0}].Control.UI.Visible.NavigationBar : {1}" + Environment.NewLine, i, manualPopups[i].Control.UI.Visible.NavigationBar.ToString());
sb.AppendFormat(" - manualPopups[{0}].Control.UI.Visible.BackButton : {1}" + Environment.NewLine, i, manualPopups[i].Control.UI.Visible.BackButton.ToString());
sb.AppendFormat(" - manualPopups[{0}].Control.UI.Visible.ForwardButton : {1}" + Environment.NewLine, i, manualPopups[i].Control.UI.Visible.ForwardButton.ToString());
sb.AppendFormat(" - manualPopups[{0}].Control.UI.Visible.RefreshButton : {1}" + Environment.NewLine, i, manualPopups[i].Control.UI.Visible.RefreshButton.ToString());
sb.AppendFormat(" - manualPopups[{0}].Control.UI.Visible.HomeButton : {1}" + Environment.NewLine, i, manualPopups[i].Control.UI.Visible.HomeButton.ToString());
sb.AppendFormat(" - manualPopups[{0}].Control.UI.Visible.DisallowedButton : {1}" + Environment.NewLine, i, manualPopups[i].Control.UI.Visible.DisallowedButton.ToString());
sb.AppendFormat(" - manualPopups[{0}].Control.UI.DisallowedDay : {1}" + Environment.NewLine, i, manualPopups[i].Control.UI.DisallowedDay.ToString());
sb.AppendFormat(" - manualPopups[{0}].Control.UI.CloseButtonImage.Normal.FileUrl : {1}" + Environment.NewLine, i, manualPopups[i].Control.UI.CloseButtonImage.Normal.FileUrl);
sb.AppendFormat(" - manualPopups[{0}].Control.UI.CloseButtonImage.Normal.FileId : {1}" + Environment.NewLine, i, manualPopups[i].Control.UI.CloseButtonImage.Normal.FileId);
sb.AppendFormat(" - manualPopups[{0}].Control.UI.CloseButtonImage.Pressed.FileUrl : {1}" + Environment.NewLine, i, manualPopups[i].Control.UI.CloseButtonImage.Pressed.FileUrl);
sb.AppendFormat(" - manualPopups[{0}].Control.UI.CloseButtonImage.Pressed.FileId : {1}" + Environment.NewLine, i, manualPopups[i].Control.UI.CloseButtonImage.Pressed.FileId);
sb.AppendFormat(" - manualPopups[{0}].Control.UI.CloseButtonImage.Type : {1}" + Environment.NewLine, i, manualPopups[i].Control.UI.CloseButtonImage.Type.ToString());
// 2.6.0 End
}
sb.AppendFormat(" - headers.Length : {0}" + Environment.NewLine, headers.Length);
for (int i = 0; i < headers.Length; i++)
{
sb.AppendFormat(" - headers[{0}].Name : {1}" + Environment.NewLine, i, headers[i].Name);
sb.AppendFormat(" - headers[{0}].Value : {1}", i, headers[i].Value);
if (i < headers.Length - 1)
sb. AppendFormat(Environment. NewLine);
}
Debug.Log(sb.ToString());
}
Plain Text
복사
Precautions
Even if the success callback (OnManualPopup) is executed, the manualPopups callback parameter may be an empty array. Before using the manualPopups callback parameter, you should first check the length of the array and decide whether or not to display a popup. In this case, check the manual pop-up settings of Partners. The exposure order of manual popups must be the same as the order of manualPopups array elements. For example, if the manualPopups array contains three elements [A,B,C], then we need to expose popups in A, B, C order.
If an error occurs while running StovePC.GetManualPopup function, OnError callback will be called.
External errors can be checked through the ExternalError field of the StovePCError structure.
ExternalError | Description |
403000 | Invalid Access Error |
400000 | Wrong API usage Error |
400001 | Not Found Error |
400002 | Not Match Error |
400003 | Already exist |
500001 | Internal Interaction Error |
900000 | Unknown Service Error |
5. Get news pop-up information
Retrieve information about news popup with StovePC.GetNewsPopup function.
StovePCResult result = StovePC.GetNewsPopup();
if(result == StovePCResult.NoError)
{
// handle success
}
Plain Text
복사
When the StovePC.GetNewsPopup function is successfully processed, the OnNewsPopup callback is called.
The StovePCNewsPopup structure passed to the callback contains the URL to the newspopup.
The StovePCPopupRequestHeader structure passed to the callback contains name/value pairs of headers to be set when requesting URLs.
private void OnNewsPopup(StovePCNewsPopup newsPopup, StovePCPopupRequestHeader[] headers)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("OnNewsPopup");
sb.AppendFormat(" - newsPopup.Origin : {0}" + Environment.NewLine, newsPopup.Origin);
sb.AppendFormat(" - newsPopup.Id : {0}" + Environment.NewLine, newsPopup.Id.ToString());
sb.AppendFormat(" - newsPopup.Url : {0}" + Environment.NewLine, newsPopup.Url);
// ADD 2.6.0 Start
sb.AppendFormat(" - newsPopup.Control.UI.Visible.CloseButton : {0}" + Environment.NewLine, newsPopup.Control.UI.Visible.CloseButton.ToString());
sb.AppendFormat(" - newsPopup.Control.UI.Visible.NavigationBar : {0}" + Environment.NewLine, newsPopup.Control.UI.Visible.NavigationBar.ToString());
sb.AppendFormat(" - newsPopup.Control.UI.Visible.BackButton : {0}" + Environment.NewLine, newsPopup.Control.UI.Visible.BackButton.ToString());
sb.AppendFormat(" - newsPopup.Control.UI.Visible.ForwardButton : {0}" + Environment.NewLine, newsPopup.Control.UI.Visible.ForwardButton.ToString());
sb.AppendFormat(" - newsPopup.Control.UI.Visible.RefreshButton : {0}" + Environment.NewLine, newsPopup.Control.UI.Visible.RefreshButton.ToString());
sb.AppendFormat(" - newsPopup.Control.UI.Visible.HomeButton : {0}" + Environment.NewLine, newsPopup.Control.UI.Visible.HomeButton.ToString());
sb.AppendFormat(" - newsPopup.Control.UI.Visible.DisallowedButton : {0}" + Environment.NewLine, newsPopup.Control.UI.Visible.DisallowedButton.ToString());
sb.AppendFormat(" - newsPopup.Control.UI.DisallowedDay : {0}" + Environment.NewLine, newsPopup.Control.UI.DisallowedDay.ToString());
sb.AppendFormat(" - newsPopup.Control.UI.CloseButtonImage.Normal.FileUrl : {0}" + Environment.NewLine, newsPopup.Control.UI.CloseButtonImage.Normal.FileUrl);
sb.AppendFormat(" - newsPopup.Control.UI.CloseButtonImage.Normal.FileId : {0}" + Environment.NewLine, newsPopup.Control.UI.CloseButtonImage.Normal.FileId);
sb.AppendFormat(" - newsPopup.Control.UI.CloseButtonImage.Pressed.FileUrl : {0}" + Environment.NewLine, newsPopup.Control.UI.CloseButtonImage.Pressed.FileUrl);
sb.AppendFormat(" - newsPopup.Control.UI.CloseButtonImage.Pressed.FileId : {0}" + Environment.NewLine, newsPopup.Control.UI.CloseButtonImage.Pressed.FileId);
sb.AppendFormat(" - newsPopup.Control.UI.CloseButtonImage.Type : {0}" + Environment.NewLine, newsPopup.Control.UI.CloseButtonImage.Type.ToString());
// 2.6.0 End
sb.AppendFormat(" - headers.Length : {0}" + Environment.NewLine, headers.Length);
for (int i = 0; i < headers.Length; i++)
{
sb.AppendFormat(" - headers[{0}].Name : {1}" + Environment.NewLine, i, headers[i].Name);
sb.AppendFormat(" - headers[{0}].Value : {1}", i, headers[i].Value);
if (i < headers.Length - 1)
sb. AppendFormat(Environment. NewLine);
}
Debug.Log(sb.ToString());
}
Plain Text
복사
Precautions
Even if the success callback (OnNewsPopup) is executed, newsPopup callback parameter properties may be default values (empty string or 0). After checking the Url property of the newsPopup callback parameter, you should decide whether or not to open a popup. In this case, check the news pop-up settings of Partners.
If an error occurs while executing StovePC.GetNewsPopup, the OnError callback is called.
External errors can be checked through the ExternalError field of the StovePCError structure.
ExternalError | Description |
403000 | Invalid Access Error |
400000 | Wrong API usage Error |
400001 | Not Found Error |
400002 | Not Match Error |
400003 | Already exist |
500001 | Internal Interaction Error |
900000 | Unknown Service Error |
6. Get coupon pop-up information
Get coupon popup information with the StovePC.GetCouponPopup function.
StovePCResult result = StovePC.GetCouponPopup();
if(result == StovePCResult.NoError)
{
// handle success
}
Plain Text
복사
When the StovePC.GetCouponPopup function is successfully processed, the OnCouponPopup callback is called.
The StovePCCouponPopup structure passed to the callback contains the URL to the coupon popup.
The StovePCPopupRequestHeader structure passed to the callback contains name/value pairs of headers to be set when requesting URLs.
private void OnCouponPopup(StovePCCouponPopup couponPopup, StovePCPopupRequestHeader[] headers)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("OnCouponPopup");
sb.AppendFormat(" - couponPopup.Url : {0}" + Environment.NewLine, couponPopup.Url);
// ADD 2.6.0 Start
sb.AppendFormat(" - couponPopup.Control.UI.Visible.CloseButton : {0}" + Environment.NewLine, couponPopup.Control.UI.Visible.CloseButton.ToString());
sb.AppendFormat(" - couponPopup.Control.UI.Visible.NavigationBar : {0}" + Environment.NewLine, couponPopup.Control.UI.Visible.NavigationBar.ToString());
sb.AppendFormat(" - couponPopup.Control.UI.Visible.BackButton : {0}" + Environment.NewLine, couponPopup.Control.UI.Visible.BackButton.ToString());
sb.AppendFormat(" - couponPopup.Control.UI.Visible.ForwardButton : {0}" + Environment.NewLine, couponPopup.Control.UI.Visible.ForwardButton.ToString());
sb.AppendFormat(" - couponPopup.Control.UI.Visible.RefreshButton : {0}" + Environment.NewLine, couponPopup.Control.UI.Visible.RefreshButton.ToString());
sb.AppendFormat(" - couponPopup.Control.UI.Visible.HomeButton : {0}" + Environment.NewLine, couponPopup.Control.UI.Visible.HomeButton.ToString());
sb.AppendFormat(" - couponPopup.Control.UI.Visible.DisallowedButton : {0}" + Environment.NewLine, couponPopup.Control.UI.Visible.DisallowedButton.ToString());
sb.AppendFormat(" - couponPopup.Control.UI.DisallowedDay : {0}" + Environment.NewLine, couponPopup.Control.UI.DisallowedDay.ToString());
sb.AppendFormat(" - couponPopup.Control.UI.CloseButtonImage.Normal.FileUrl : {0}" + Environment.NewLine, couponPopup.Control.UI.CloseButtonImage.Normal.FileUrl);
sb.AppendFormat(" - couponPopup.Control.UI.CloseButtonImage.Normal.FileId : {0}" + Environment.NewLine, couponPopup.Control.UI.CloseButtonImage.Normal.FileId);
sb.AppendFormat(" - couponPopup.Control.UI.CloseButtonImage.Pressed.FileUrl : {0}" + Environment.NewLine, couponPopup.Control.UI.CloseButtonImage.Pressed.FileUrl);
sb.AppendFormat(" - couponPopup.Control.UI.CloseButtonImage.Pressed.FileId : {0}" + Environment.NewLine, couponPopup.Control.UI.CloseButtonImage.Pressed.FileId);
sb.AppendFormat(" - couponPopup.Control.UI.CloseButtonImage.Type : {0}" + Environment.NewLine, couponPopup.Control.UI.CloseButtonImage.Type.ToString());
// 2.6.0 End
sb.AppendFormat(" - headers.Length : {0}" + Environment.NewLine, headers.Length);
for (int i = 0; i < headers.Length; i++)
{
sb.AppendFormat(" - headers[{0}].Name : {1}" + Environment.NewLine, i, headers[i].Name);
sb.AppendFormat(" - headers[{0}].Value : {1}", i, headers[i].Value);
if (i < headers.Length - 1)
sb. AppendFormat(Environment. NewLine);
}
Debug.Log(sb.ToString());
}
Plain Text
복사
If an error occurs while running the StovePC.GetCouponPopup function, the OnError callback is called.
7. Get community pop-up information
Get community popup information with the StovePC.GetCommunityPopup function.
StovePCResult result = StovePC.GetCommunityPopup();
if(result == StovePCResult.NoError)
{
// handle success
}
Plain Text
복사
When the StovePC.GetCommunityPopup function is successfully processed, the OnCommunityPopup callback is called.
The StovePCCommunityPopup structure passed to the callback contains the URL to the community popup.
The StovePCPopupRequestCookie structure passed to the callback contains the cookie name/value pair to be set when requesting the URL.
private void OnCommunityPopup(StovePCCommunityPopup communityPopup, StovePCPopupRequestCookie[] cookies)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("OnCommunityPopup");
sb.AppendFormat(" - communityPopup.Url : {0}" + Environment.NewLine, communityPopup.Url);
// ADD 2.6.0 Start
sb.AppendFormat(" - communityPopup.Control.UI.Visible.CloseButton : {0}" + Environment.NewLine, communityPopup.Control.UI.Visible.CloseButton.ToString());
sb.AppendFormat(" - communityPopup.Control.UI.Visible.NavigationBar : {0}" + Environment.NewLine, communityPopup.Control.UI.Visible.NavigationBar.ToString());
sb.AppendFormat(" - communityPopup.Control.UI.Visible.BackButton : {0}" + Environment.NewLine, communityPopup.Control.UI.Visible.BackButton.ToString());
sb.AppendFormat(" - communityPopup.Control.UI.Visible.ForwardButton : {0}" + Environment.NewLine, communityPopup.Control.UI.Visible.ForwardButton.ToString());
sb.AppendFormat(" - communityPopup.Control.UI.Visible.RefreshButton : {0}" + Environment.NewLine, communityPopup.Control.UI.Visible.RefreshButton.ToString());
sb.AppendFormat(" - communityPopup.Control.UI.Visible.HomeButton : {0}" + Environment.NewLine, communityPopup.Control.UI.Visible.HomeButton.ToString());
sb.AppendFormat(" - communityPopup.Control.UI.Visible.DisallowedButton : {0}" + Environment.NewLine, communityPopup.Control.UI.Visible.DisallowedButton.ToString());
sb.AppendFormat(" - communityPopup.Control.UI.DisallowedDay : {0}" + Environment.NewLine, communityPopup.Control.UI.DisallowedDay.ToString());
sb.AppendFormat(" - communityPopup.Control.UI.CloseButtonImage.Normal.FileUrl : {0}" + Environment.NewLine, communityPopup.Control.UI.CloseButtonImage.Normal.FileUrl);
sb.AppendFormat(" - communityPopup.Control.UI.CloseButtonImage.Normal.FileId : {0}" + Environment.NewLine, communityPopup.Control.UI.CloseButtonImage.Normal.FileId);
sb.AppendFormat(" - communityPopup.Control.UI.CloseButtonImage.Pressed.FileUrl : {0}" + Environment.NewLine, communityPopup.Control.UI.CloseButtonImage.Pressed.FileUrl);
sb.AppendFormat(" - communityPopup.Control.UI.CloseButtonImage.Pressed.FileId : {0}" + Environment.NewLine, communityPopup.Control.UI.CloseButtonImage.Pressed.FileId);
sb.AppendFormat(" - communityPopup.Control.UI.CloseButtonImage.Type : {0}" + Environment.NewLine, communityPopup.Control.UI.CloseButtonImage.Type.ToString());
// 2.6.0 End
sb.AppendFormat(" - cookies.Length : {0}" + Environment.NewLine, cookies.Length);
for (int i = 0; i < cookies.Length; i++)
{
sb.AppendFormat(" - cookies[{0}].Name : {1}" + Environment.NewLine, i, cookies[i].Name);
sb.AppendFormat(" - cookies[{0}].Value : {1}", i, cookies[i].Value);
if (i < cookies.Length - 1)
sb. AppendFormat(Environment. NewLine);
}
Debug.Log(sb.ToString());
}
Plain Text
복사
If an error occurs while running the StovePC.GetCommunityPopup function, the OnError callback is called.
External errors can be checked through the ExternalError field of the StovePCError structure.
ExternalError | Description |
13008 | Mandatory Parameter missing |
90001 | AccessToken invalid |
40101 | Invalid token |
8. Disable pop-ups
With the StovePC.SetPopupDisallowed function, set a specific pop-up not to be displayed for a certain period of time.
If the game directly implements the PC SDK pop-up UI, configure the UI by referring to the Control.UI.Visible.DisallowedButton value of the pop-up UI information
Call StovePC.SetPopupDisallowed function from button click handler.
When calling the StevePC.SetPopupDisallowed method, the days parameter uses the Control.UI.DisallowedDay value of the popup information.
If pop-up disallow is set, the relevant pop-up information will not be searched during the disallow period.
// input parameters
// int popupId : Popup identifier issued by Partners
// int days : the number of days of disallowance registered by Partners (once) or -1 (don't look again)
// int days : Unacceptable period registered by Partners (in days)
StovePCResult result = StovePC.SetPopupDisallowed(POPUP_ID, DAYS);
if (result == StovePCResult.NoError)
{
// handle success
}
Plain Text
복사