// Starts up the billing service. This will also check to see if in app billing is supported and fire the appropriate event public static void init(Options options) { if (EventManager == null) { // Avoid duplication EventManager = GameObject.FindObjectOfType <OpenIABEventManager>(); if (EventManager == null) { EventManager = new GameObject(typeof(OpenIABEventManager).ToString()).AddComponent <OpenIABEventManager>(); } OpenIABEventManager.billingSupportedEvent += BillingSupportedEvent; OpenIABEventManager.billingNotSupportedEvent += BillingNotSupportedEvent; OpenIABEventManager.purchaseSucceededEvent += PurchaseSucceededEvent; OpenIABEventManager.purchaseFailedEvent += PurchaseFailedEvent; OpenIABEventManager.consumePurchaseSucceededEvent += ConsumePurchaseSucceededEvent; OpenIABEventManager.consumePurchaseFailedEvent += ConsumePurchaseFailedEvent; OpenIABEventManager.transactionRestoredEvent += TransactionRestoredEvent; OpenIABEventManager.restoreSucceededEvent += RestoreSucceededEvent; OpenIABEventManager.restoreFailedEvent += RestoreFailedEvent; } _billing.init(options); }
// Starts up the billing service. This will also check to see if in app billing is supported and fire the appropriate event public static void init(Options options) { _billing.init(options); }