Everything works fine if I click the buttons one after another, but if I put the IAP initialization on the Unity Services initialization callback the app crashes on Android:
Are you using a button to set all this up? I have a class that I set up on Awake(), set it to DontDestroyOnLoad, and store the instance in a public singleton. If you press both buttons too fast, the await might not have finished yet.
I am trying a different approach @NoPants . I am initializing the Unity Services on the first scene of my game, and the Unity Purchasing on the second one, I think this is going to work. Thank you a lot for trying to help me. I do not know, I think this may be an issue with Unity Services + Unity Purchasing on Android, who knows.
I don’t think that’s the problem tbh. Async can be a bit tricky. You may find it works sometimes, but not always with the way you are talking about setting it up. But if you test it and it does work all the time, I guess it doesn’t matter.
It’s working now… I was using async at first, and I had to change because the apps was rejected once it was crashing on the reviewers devices… This is weird, but at least it seems to work all the times. Thank you again man!