Initialization
Last updated
Was this helpful?
Here is how to initialize the Wepin widget Unity SDK.
Add the Wepin and Types namespaces.
using WepinSDK.Wepin;
using WepinSDK.Types;Create a Wepin instance in the start() function of the project.
Wepin _wepin = Wepin.Instance;Use the App ID and App Key assigned after app registration to initialize the instance.
_wepin.Initialize("app_id_eg12sf3491azgs520", "ak_test_ghq1D5s1sfG234sbnhdsw24mnovk313", new Attributes()
{
defaultLanguage = "ko",
defaultCurrency = "krw"
});The parameters for initialization are as follows.
appId: String
App ID assigned during registration
appKey: String
App Key assigned during registration
attributes: WepinSDK.Types.Attributes
Properties of the Wepin Widget
defaultLanguage: String
The language to be displayed on the widget. The default value is ko. The currently supported languages are en and ko.
defaultCurrency: String
The currency to be displayed on the widget. The default value is KRW. The currently supported currencies are USD and KRW.
isInitializedYou can use the isInitialized method to check if the Wepin instance has been initialized successfully.
The returned value is as follows.
boolean
init result; true if Wepin SDK is already initialized, otherwise false.
Last updated
Was this helpful?
Was this helpful?
if(_wepin.isInitialized()) {
// Success to initialize wepin
}