We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 471b813 commit 5b01dccCopy full SHA for 5b01dcc
misc/android_iap/iap.gd
@@ -15,9 +15,14 @@ signal consume_not_required
15
signal sku_details_complete
16
signal sku_details_error
17
18
-onready var payment = Engine.get_singleton("GodotPayments")
+var payment
19
20
func _ready():
21
+ if Engine.has_singleton("GodotPayment"):
22
+ payment = Engine.get_singleton("GodotPayments")
23
+ else:
24
+ print("GodotPayment singleton is only available on Android devices.")
25
+
26
if payment:
27
# set callback with this script instance
28
payment.setPurchaseCallbackId(get_instance_id())
0 commit comments