T 已知的 IStoreConfiguration。
访问特定于商店的配置设置。
另请参阅:IStoreConfiguration 和 IPurchasingBinder.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) {}
}