When the IAP store is open, if the phone is not connected to the Internet or an unknown network failure, then I should set the status of the IAP store falsh, how do I know whether the network connection is available?
Currently I think of the judgment of IAPButton.GetComponent (.TitleText.text)! = “Load…”, if true shows that access to the network has been completed, otherwise it will prompt network fault, Otherwise, the available state of IAP goods will always be false
If there is no internet connection, purchases will not be completed and the store will show the user an error message that says just that.
If you want to hide your store completely when there is no internet, you could use a coroutine that constantly polls for network connectivity. There are a few Unity Answers posts about how to do this: