Hi!
I'm curious what exactly can cause the PlayFabHTTP script to destroy.
The reason why I'm asking this is that PlayFabHTTP is being destroyed a couple of ms after starting my build, which results in not finishing the coroutines and thus the WebRequests.
I have logged this, but it's not a scene change that's causing this. PlayFabHTTP can't be destroyed, because it's a DontDestroyOnLoad object.
I hope someone here can help me out fixing this issue.
Thanks in advance!
EDIT:
I'm using PlayFab SDK version 2.136.220523
This destroy issue does not happen in-editor, but it does happen in-build. Doesn't matter if it's IL2CPP or Mono or if Stripping Code is minimal.
UPDATE 02.06.2022:
I've tried reproducing it in an empty project with the PlayFab SDK in it.
The PlayFab calls would be called with this attribute: [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)]
This means that before the first scene has been loaded, PlayFabHTTP had to call the WebRequest already.
Now the thing is, is that PlayFabHTTP doesn't like that and just destroys itself because of that, even if it's DontDestroyOnLoad.
If we're not using that attribute and we make sure the script is a MonoBehaviour, it works fine.