72 lines
2.2 KiB
Plaintext
72 lines
2.2 KiB
Plaintext
[gd_scene load_steps=3 format=3 uid="uid://dx43bqbhvi3am"]
|
|
|
|
[ext_resource type="Script" path="res://Main.cs" id="1"]
|
|
[ext_resource type="Script" path="res://GodotGooglePlayBilling/GooglePlayBilling.cs" id="2"]
|
|
|
|
[node name="Main" type="Control"]
|
|
layout_mode = 3
|
|
anchors_preset = 8
|
|
anchor_left = 0.5
|
|
anchor_top = 0.5
|
|
anchor_right = 0.5
|
|
anchor_bottom = 0.5
|
|
offset_left = -512.711
|
|
offset_top = -300.0
|
|
offset_right = 511.289
|
|
offset_bottom = 300.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
size_flags_horizontal = 2
|
|
size_flags_vertical = 2
|
|
script = ExtResource("1")
|
|
|
|
[node name="AlertDialog" type="AcceptDialog" parent="."]
|
|
dialog_autowrap = true
|
|
|
|
[node name="Label" type="Label" parent="."]
|
|
layout_mode = 0
|
|
offset_left = 242.711
|
|
offset_top = 39.0
|
|
offset_right = 1083.71
|
|
offset_bottom = 297.0
|
|
size_flags_horizontal = 2
|
|
size_flags_vertical = 0
|
|
text = "To test in-app purchase on android device,
|
|
|
|
1. Make sure you have enabled \"Custom Build\" and the GodotPayment plugin in your Android export settings
|
|
2. Export APK and upload it as alpha or beta stage to Google Play Developer Console and publish it.
|
|
(It's not published to public, but you and other testers can access it.)
|
|
3. There should be an activate in-app item. Copy its SKU into the TEST_ITEM_SKU constant in iap_demo.gd
|
|
4. Changes you make in the Play Console may take some time before taking effect"
|
|
|
|
[node name="QuerySkuDetailsButton" type="Button" parent="."]
|
|
layout_mode = 0
|
|
offset_left = 40.5697
|
|
offset_top = 39.9347
|
|
offset_right = 221.57
|
|
offset_bottom = 91.9347
|
|
text = "Query SKU details"
|
|
|
|
[node name="PurchaseButton" type="Button" parent="."]
|
|
layout_mode = 0
|
|
offset_left = 40.5697
|
|
offset_top = 101.203
|
|
offset_right = 221.57
|
|
offset_bottom = 153.203
|
|
text = "Purchase"
|
|
|
|
[node name="ConsumeButton" type="Button" parent="."]
|
|
layout_mode = 0
|
|
offset_left = 40.5697
|
|
offset_top = 162.142
|
|
offset_right = 221.57
|
|
offset_bottom = 214.142
|
|
text = "Consume"
|
|
|
|
[node name="GooglePlayBilling" type="Node" parent="."]
|
|
script = ExtResource("2")
|
|
|
|
[connection signal="pressed" from="QuerySkuDetailsButton" to="." method="OnQuerySkuDetailsButton_pressed"]
|
|
[connection signal="pressed" from="PurchaseButton" to="." method="OnPurchaseButton_pressed"]
|
|
[connection signal="pressed" from="ConsumeButton" to="." method="OnConsumeButton_pressed"]
|