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`
27
27
``` csharp
28
28
" com.wolf-package.in-app-purchasing" : " https://github.com/wolf-package/in-app-purchasing-unity.git#1.0.0" ,
29
29
```
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
+ ```
30
34
31
35
## Use
32
36
Original file line number Diff line number Diff line change 5
5
using UnityEngine ;
6
6
using UnityEngine . Purchasing ;
7
7
using UnityEngine . Purchasing . Extension ;
8
+ using VirtueSky . Misc ;
8
9
9
10
namespace VirtueSky . Iap
10
11
{
@@ -93,7 +94,7 @@ private void InternalPurchaseFailed(string id)
93
94
{
94
95
if ( product . Id != id ) continue ;
95
96
OnPurchaseFailedEvent ? . Invoke ( product . Id ) ;
96
- CallActionAndClean ( ref product . purchaseFailedCallback ) ;
97
+ Common . CallActionAndClean ( ref product . purchaseFailedCallback ) ;
97
98
}
98
99
}
99
100
@@ -166,7 +167,7 @@ void InternalPurchaseSuccess(string id)
166
167
{
167
168
if ( product . Id != id ) continue ;
168
169
OnPurchaseSucceedEvent ? . Invoke ( product . Id ) ;
169
- CallActionAndClean ( ref product . purchaseSuccessCallback ) ;
170
+ Common . CallActionAndClean ( ref product . purchaseSuccessCallback ) ;
170
171
}
171
172
}
172
173
@@ -248,14 +249,6 @@ private static void AutoInitialize()
248
249
}
249
250
}
250
251
251
- private void CallActionAndClean ( ref Action action )
252
- {
253
- if ( action == null ) return ;
254
- var a = action ;
255
- a ( ) ;
256
- action = null ;
257
- }
258
-
259
252
#region API
260
253
261
254
public IapDataProduct PurchaseProduct ( string id )
Original file line number Diff line number Diff line change 7
7
"GUID:e63a64384cc3ef04cac761c1ce76e9c2",
8
8
"GUID:08d1c582746949b40ba6a45cdb776bdf",
9
9
"GUID:fe25561d224ed4743af4c60938a59d0b",
10
- "GUID:70ea675efa2644cef98c7ece24158333"
10
+ "GUID:70ea675efa2644cef98c7ece24158333",
11
+ "GUID:928509ee676cc2e439010e69f455e144"
11
12
],
12
13
"includePlatforms": [],
13
14
"excludePlatforms": [],
Original file line number Diff line number Diff line change 18
18
" UnityIAP"
19
19
],
20
20
"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"
22
23
}
23
24
}
You can’t perform that action at this time.
0 commit comments