main.tscn 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. [gd_scene load_steps=2 format=2]
  2. [ext_resource path="res://iap_demo.gd" type="Script" id=1]
  3. [node name="Control" type="Control"]
  4. anchor_left = 0.5
  5. anchor_top = 0.5
  6. anchor_right = 0.5
  7. anchor_bottom = 0.5
  8. margin_left = -512.0
  9. margin_top = -300.0
  10. margin_right = 512.0
  11. margin_bottom = 300.0
  12. size_flags_horizontal = 2
  13. size_flags_vertical = 2
  14. script = ExtResource( 1 )
  15. __meta__ = {
  16. "_edit_use_anchors_": false
  17. }
  18. [node name="purchase" type="Button" parent="."]
  19. margin_left = 40.0
  20. margin_top = 40.0
  21. margin_right = 250.0
  22. margin_bottom = 120.0
  23. size_flags_horizontal = 2
  24. size_flags_vertical = 2
  25. text = "Purchase in app"
  26. [node name="consume" type="Button" parent="."]
  27. margin_left = 40.0
  28. margin_top = 150.0
  29. margin_right = 250.0
  30. margin_bottom = 230.0
  31. size_flags_horizontal = 2
  32. size_flags_vertical = 2
  33. text = "Consume in app"
  34. [node name="request" type="Button" parent="."]
  35. margin_left = 40.0
  36. margin_top = 260.0
  37. margin_right = 250.0
  38. margin_bottom = 340.0
  39. size_flags_horizontal = 2
  40. size_flags_vertical = 2
  41. text = "Request purchased"
  42. [node name="query" type="Button" parent="."]
  43. margin_left = 40.0
  44. margin_top = 370.0
  45. margin_right = 250.0
  46. margin_bottom = 450.0
  47. size_flags_horizontal = 2
  48. size_flags_vertical = 2
  49. text = "Query in app items"
  50. [node name="alert" type="AcceptDialog" parent="."]
  51. margin_left = 290.0
  52. margin_top = 60.0
  53. margin_right = 700.0
  54. margin_bottom = 290.0
  55. size_flags_horizontal = 2
  56. size_flags_vertical = 2
  57. [node name="Label" type="Label" parent="."]
  58. margin_left = 300.0
  59. margin_top = 40.0
  60. margin_right = 932.0
  61. margin_bottom = 207.0
  62. size_flags_horizontal = 2
  63. size_flags_vertical = 0
  64. text = "\"iap\" is located in Autoloads. See Project > Project Settings > AutoLoad
  65. To enable IAP module
  66. 1. Project > Project Settings
  67. 2. write [Category : android] / [Property : modules] / [Type : String] and click Add
  68. 3. Click \"Android\" on left panel
  69. 4. double click on right filed of \"modules\"
  70. 5. write \"org/godotengine/godot/GodotPaymentV3\"
  71. To test in-app purchase on android device,
  72. 1. Need to add \"com.android.vending.BILLING\" permission at Project > Export > Android > User Permissions
  73. 2. Export APK and upload it as alpha or beta stage to Google Play Developer Console and publish it.
  74. (It's not published to public, but you and tester can access it.)
  75. 3. There should be activated in-app item
  76. 4. Any changes on Developer console will take 2~3 hours to take effect"