public static Boolean Initialize(IPurchasingEventSender platform) { if (!s_Initialized) { try { s_PurchasingManagerType = Type.GetType(s_PurchasingManagerClassName, true); s_PurchasingInitiatePurchaseMethodInfo = s_PurchasingManagerType.GetMethod(s_PurchasingInitiatePurchaseMethodName, new Type[] { typeof(string) }); s_PurchasingGetPromoVersionMethodInfo = s_PurchasingManagerType.GetMethod(s_PurchasingGetPromoVersionMethodName); s_PurchasingGetPromoCatalogMethodInfo = s_PurchasingManagerType.GetMethod(s_PurchasingGetPromoCatalogMethodName); } catch (Exception exception) { Debug.LogException(exception); return(false); } s_Initialized = true; s_Platform = platform; } return(s_Initialized); }
public static Boolean Initialize(IPurchasingEventSender platform) { if (!s_Initialized) { try { s_PurchasingManagerType = Type.GetType(s_PurchasingManagerClassName, true); s_PurchasingInitiatePurchaseMethodInfo = s_PurchasingManagerType.GetMethod(s_PurchasingInitiatePurchaseMethodName, new Type[] { typeof(string) }); s_PurchasingGetPromoVersionMethodInfo = s_PurchasingManagerType.GetMethod(s_PurchasingGetPromoVersionMethodName); s_PurchasingGetPromoCatalogMethodInfo = s_PurchasingManagerType.GetMethod(s_PurchasingGetPromoCatalogMethodName); } catch (Exception exception) { Debug.LogWarning(exception.Message + "It is likely that a promo has been enabled on a placement, but IAP Promo has not been enabled in the project."); return(false); } s_Initialized = true; s_Platform = platform; } return(s_Initialized); }
public void Initialize(IPurchasingEventSender platform) { m_Platform = platform; m_UnityPurchasing.CallStatic("initialize", this); }