public T Configure ();

Returns

T 已知的 IStoreConfiguration。

Description

访问特定于商店的配置设置。

另请参阅:IStoreConfigurationIPurchasingBinder.RegisterConfiguration

下面是配置商店以在商店类中进行初始化的示例。


using UnityEngine;
using UnityEngine.Purchasing;

public class MyStoreClass : MonoBehaviour, IStoreListener { void Awake() { ConfigurationBuilder builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance()); builder.AddProduct("levelpackfoo", ProductType.NonConsumable); builder.Configure<IGooglePlayConfiguration>().SetPublicKey("MIIBIjA...j"); UnityPurchasing.Initialize(this, builder); }

public void OnInitialized(IStoreController controller, IExtensionProvider extensions) {} public void OnInitializeFailed(InitializationFailureReason error) {} public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e) { return PurchaseProcessingResult.Complete; } public void OnPurchaseFailed(Product item, PurchaseFailureReason r) {} }