Skip to content

Commit 7e6aaed

Browse files
committed
-update
1 parent d213050 commit 7e6aaed

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

Runtime/IapManager.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace VirtueSky.Iap
1010
{
1111
public class IapManager : MonoBehaviour, IDetailedStoreListener
1212
{
13-
public static IapManager instance;
13+
public static IapManager Instance;
1414
public static event Action<string> OnPurchaseSucceedEvent;
1515
public static event Action<string> OnPurchaseFailedEvent;
1616
public static event Action<Product> OnIapTrackingRevenueEvent;
@@ -23,9 +23,9 @@ public class IapManager : MonoBehaviour, IDetailedStoreListener
2323

2424
private void Awake()
2525
{
26-
if (instance == null)
26+
if (Instance == null)
2727
{
28-
instance = this;
28+
Instance = this;
2929
}
3030
else
3131
{
@@ -35,7 +35,7 @@ private void Awake()
3535

3636
private void OnDestroy()
3737
{
38-
if (instance == this) instance = null;
38+
if (Instance == this) Instance = null;
3939
}
4040

4141
private void Start()

Runtime/IapSettings.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@ namespace VirtueSky.Iap
77
public class IapSettings : ScriptableObject
88
{
99
private static IapSettings instance;
10+
1011
public static IapSettings Instance
1112
{
1213
get
1314
{
1415
if (instance != null) return instance;
1516

1617
instance = Resources.Load<IapSettings>(typeof(IapSettings).Name);
17-
if (instance == null) throw new Exception($"Scriptable setting for {typeof(IapSettings)} must be create before run!");
18+
if (instance == null)
19+
throw new Exception($"Scriptable setting for {typeof(IapSettings)} must be create before run!");
1820
return instance;
1921
}
2022
}
23+
2124
[SerializeField] private bool runtimeAutoInit = true;
2225
[SerializeField] private List<IapDataProduct> iapDataProducts = new List<IapDataProduct>();
2326
[SerializeField] private bool isValidatePurchase = true;

0 commit comments

Comments
 (0)