diff --git a/Runtime/GuruIAP/Runtime/Code/IAPModel.cs b/Runtime/GuruIAP/Runtime/Code/IAPModel.cs index 5bf90ee..2adaa8e 100644 --- a/Runtime/GuruIAP/Runtime/Code/IAPModel.cs +++ b/Runtime/GuruIAP/Runtime/Code/IAPModel.cs @@ -234,7 +234,21 @@ namespace Guru } #endregion - + + #region ClearData + + public void ClearData() + { + googleOrders.Clear(); + appleOrders.Clear(); + androidTokens.Clear(); + iosReceipts.Clear(); + buyCount = 0; + isIapUser = false; + Save(); + } + + #endregion } diff --git a/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs b/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs index 9e83a40..5c67547 100644 --- a/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs +++ b/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs @@ -52,7 +52,10 @@ namespace Guru } - private IAPModel _model; + protected IAPModel _model; + + + /// /// 是否是首次购买 /// @@ -1367,6 +1370,7 @@ namespace Guru } #endregion + } } \ No newline at end of file