main.tscn 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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.0
  5. anchor_top = 0.0
  6. anchor_right = 1.0
  7. anchor_bottom = 1.0
  8. rect_pivot_offset = Vector2( 0, 0 )
  9. rect_clip_content = false
  10. mouse_filter = 0
  11. size_flags_horizontal = 2
  12. size_flags_vertical = 2
  13. script = ExtResource( 1 )
  14. [node name="purchase" type="Button" parent="."]
  15. anchor_left = 0.0
  16. anchor_top = 0.0
  17. anchor_right = 0.0
  18. anchor_bottom = 0.0
  19. margin_left = 40.0
  20. margin_top = 40.0
  21. margin_right = 250.0
  22. margin_bottom = 120.0
  23. rect_pivot_offset = Vector2( 0, 0 )
  24. rect_clip_content = false
  25. mouse_filter = 0
  26. size_flags_horizontal = 2
  27. size_flags_vertical = 2
  28. toggle_mode = false
  29. enabled_focus_mode = 2
  30. shortcut = null
  31. group = null
  32. text = "Purchase in app"
  33. flat = false
  34. [node name="consume" type="Button" parent="."]
  35. anchor_left = 0.0
  36. anchor_top = 0.0
  37. anchor_right = 0.0
  38. anchor_bottom = 0.0
  39. margin_left = 40.0
  40. margin_top = 150.0
  41. margin_right = 250.0
  42. margin_bottom = 230.0
  43. rect_pivot_offset = Vector2( 0, 0 )
  44. rect_clip_content = false
  45. mouse_filter = 0
  46. size_flags_horizontal = 2
  47. size_flags_vertical = 2
  48. toggle_mode = false
  49. enabled_focus_mode = 2
  50. shortcut = null
  51. group = null
  52. text = "Consume in app"
  53. flat = false
  54. [node name="request" type="Button" parent="."]
  55. anchor_left = 0.0
  56. anchor_top = 0.0
  57. anchor_right = 0.0
  58. anchor_bottom = 0.0
  59. margin_left = 40.0
  60. margin_top = 260.0
  61. margin_right = 250.0
  62. margin_bottom = 340.0
  63. rect_pivot_offset = Vector2( 0, 0 )
  64. rect_clip_content = false
  65. mouse_filter = 0
  66. size_flags_horizontal = 2
  67. size_flags_vertical = 2
  68. toggle_mode = false
  69. enabled_focus_mode = 2
  70. shortcut = null
  71. group = null
  72. text = "Request purchased"
  73. flat = false
  74. [node name="query" type="Button" parent="."]
  75. anchor_left = 0.0
  76. anchor_top = 0.0
  77. anchor_right = 0.0
  78. anchor_bottom = 0.0
  79. margin_left = 40.0
  80. margin_top = 370.0
  81. margin_right = 250.0
  82. margin_bottom = 450.0
  83. rect_pivot_offset = Vector2( 0, 0 )
  84. rect_clip_content = false
  85. mouse_filter = 0
  86. size_flags_horizontal = 2
  87. size_flags_vertical = 2
  88. toggle_mode = false
  89. enabled_focus_mode = 2
  90. shortcut = null
  91. group = null
  92. text = "Query in app items"
  93. flat = false
  94. [node name="alert" type="AcceptDialog" parent="."]
  95. visible = false
  96. anchor_left = 0.0
  97. anchor_top = 0.0
  98. anchor_right = 0.0
  99. anchor_bottom = 0.0
  100. margin_left = 290.0
  101. margin_top = 60.0
  102. margin_right = 700.0
  103. margin_bottom = 290.0
  104. rect_pivot_offset = Vector2( 0, 0 )
  105. rect_clip_content = false
  106. mouse_filter = 0
  107. size_flags_horizontal = 2
  108. size_flags_vertical = 2
  109. popup_exclusive = false
  110. window_title = "Alert!"
  111. resizable = false
  112. dialog_hide_on_ok = true
  113. [node name="Label" type="Label" parent="."]
  114. anchor_left = 0.0
  115. anchor_top = 0.0
  116. anchor_right = 0.0
  117. anchor_bottom = 0.0
  118. margin_left = 300.0
  119. margin_top = 40.0
  120. margin_right = 932.0
  121. margin_bottom = 207.0
  122. rect_pivot_offset = Vector2( 0, 0 )
  123. rect_clip_content = false
  124. mouse_filter = 2
  125. size_flags_horizontal = 2
  126. size_flags_vertical = 0
  127. text = "\"iap\" is located in Autoloads. See Project > Project Settings > AutoLoad
  128. To enable IAP module
  129. 1. Project > Project Settings
  130. 2. write [Category : android] / [Property : modules] / [Type : String] and click Add
  131. 3. Click \"Android\" on left panel
  132. 4. double click on right filed of \"modules\"
  133. 5. write \"org/godotengine/godot/GodotPaymentV3\"
  134. To test in-app purchase on android device,
  135. 1. Need to add \"com.android.vending.BILLING\" permission at Project > Export > Android > User Permissions
  136. 2. Export APK and upload it as alpha or beta stage to Google Play Developer Console and publish it.
  137. (It's not published to public, but you and tester can access it.)
  138. 3. There should be activated in-app item
  139. 4. Any changes on Developer console will take 2~3 hours to take effect"
  140. percent_visible = 1.0
  141. lines_skipped = 0
  142. max_lines_visible = -1