File tree Expand file tree Collapse file tree 4 files changed +11
-12
lines changed Expand file tree Collapse file tree 4 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ for version `1.0.0`
2727``` csharp
2828" com.wolf-package.in-app-purchasing" : " https://github.com/wolf-package/in-app-purchasing-unity.git#1.0.0" ,
2929```
30+ dependency ` extensions-unity-1.0.0 `
31+ ``` csharp
32+ " com.wolf-package.extensions" : " https://github.com/wolf-package/extensions-unity.git#1.0.0" ,
33+ ```
3034
3135## Use
3236
Original file line number Diff line number Diff line change 55using UnityEngine ;
66using UnityEngine . Purchasing ;
77using UnityEngine . Purchasing . Extension ;
8+ using VirtueSky . Misc ;
89
910namespace VirtueSky . Iap
1011{
@@ -93,7 +94,7 @@ private void InternalPurchaseFailed(string id)
9394 {
9495 if ( product . Id != id ) continue ;
9596 OnPurchaseFailedEvent ? . Invoke ( product . Id ) ;
96- CallActionAndClean ( ref product . purchaseFailedCallback ) ;
97+ Common . CallActionAndClean ( ref product . purchaseFailedCallback ) ;
9798 }
9899 }
99100
@@ -166,7 +167,7 @@ void InternalPurchaseSuccess(string id)
166167 {
167168 if ( product . Id != id ) continue ;
168169 OnPurchaseSucceedEvent ? . Invoke ( product . Id ) ;
169- CallActionAndClean ( ref product . purchaseSuccessCallback ) ;
170+ Common . CallActionAndClean ( ref product . purchaseSuccessCallback ) ;
170171 }
171172 }
172173
@@ -248,14 +249,6 @@ private static void AutoInitialize()
248249 }
249250 }
250251
251- private void CallActionAndClean ( ref Action action )
252- {
253- if ( action == null ) return ;
254- var a = action ;
255- a ( ) ;
256- action = null ;
257- }
258-
259252 #region API
260253
261254 public IapDataProduct PurchaseProduct ( string id )
Original file line number Diff line number Diff line change 77 "GUID:e63a64384cc3ef04cac761c1ce76e9c2",
88 "GUID:08d1c582746949b40ba6a45cdb776bdf",
99 "GUID:fe25561d224ed4743af4c60938a59d0b",
10- "GUID:70ea675efa2644cef98c7ece24158333"
10+ "GUID:70ea675efa2644cef98c7ece24158333",
11+ "GUID:928509ee676cc2e439010e69f455e144"
1112 ],
1213 "includePlatforms": [],
1314 "excludePlatforms": [],
Original file line number Diff line number Diff line change 1818 " UnityIAP"
1919 ],
2020 "dependencies" : {
21- "com.unity.purchasing" : " 4.12.0"
21+ "com.unity.purchasing" : " 4.12.0" ,
22+ "com.wolf-package.extensions" : " https://github.com/wolf-package/extensions-unity.git#1.0.0"
2223 }
2324}
You can’t perform that action at this time.
0 commit comments