How to display the in app purchase button?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Zaramath

I am trying to put the option to buy in my Godot project. I have managed to know if I have already bought or not but I don’t know how to make the buy button show up.

var InAppStore = Engine.get_singleton(“InAppStore”)
var result = InAppStore.purchase( { “my-id-purchase”: “name_id” } )
if result == OK:
#continue game
#show in app purchase button

Read this all of it. Purchases on IOS have nothing to do with Android or Engine.getsingleton (If i get it correctly sigleton already exists if iap enabled you just use it). I don’t have iphone to test.

yrtv | 2021-02-07 13:13

:bust_in_silhouette: Reply From: yrtv

Will show Button


Will hide Button

Full Documentation here: CanvasItem — Godot Engine (stable) documentation in English

Thanks for your response, but my problem is how to show the “ios in app purchase button” to make the purchase

Zaramath | 2021-02-07 07:03