In PlayFab Settings, what are the implications of the different options for Request Type (UnityWWW, HTTPWebRequest, UnityWebRequest)? What is the preferred setting and what are the differences?
In PlayFab Settings, what are the implications of the different options for Request Type (UnityWWW, HTTPWebRequest, UnityWebRequest)? What is the preferred setting and what are the differences?
In the past, we have maintained multiple HTTP stacks, because each had separate benefits in different circumstances, and there were sometimes issues with one which were resolved by the other(s).
With Unity 2018.2, Unity has discontinued WWW, in favor of UnityWebRequest, and so we will likely be removing the WWW option for that version. As of 2017.1, WWW was just a wrapper for UnityWebRequest anyways, so that doesn't change anything for you.
Additionally, in Unity 2018.2, Unity has upgraded UnityWebRequest to have some TLS1.2 security upgrades, which do not exist in the other options.
So, TLDR:
You should use UnityWebRequest. We will very likely make that the default sometime soon.
Are there any updates on this?
Is UnityWebRequest still the only alternative to support TLS 1.2, or can I also use UnityHttpRequest?
I'm currently using UnityHttpRequest and get the warning:
PlayFab API calls will likely fail because you have not set up a HttpWebRequest certificate validation mechanism. Please set a validation callback into PlayFab.Internal.PlayFabWebRequest.CustomCertValidationHook, or set PlayFab.Internal.PlayFabWebRequest.SkipCertificateValidation()
However, from the Editor at least everything seems to work just nice on Unity 2019.1.11f and NET 4.x for both API compatibility and runtime version.
Has TLS 1.2 support been added perhaps? If so, the warning should be removed or maybe clarify what platforms are not supported.
The reason I favor UnityHttpRequest is that it does not require me to call PlayFab SDK from main thread. As an example, I have a leaderboard service that use a .NET timer to poll PlayFab for updated statistics. With UnityWebRequest it throws an exception that I have to run on the main thread.
I could use a MonoBehavior game object and InvokeRepeating to poll the leaderboard service, but I really don't like tying too much logic to the Unity framework if I can help it. Is that how I would have to go about it to when using UnityWebRequest, or is there perhaps a better way?
To recap:
1. Is TLS 1.2 supported on UnityHttpRequest in newer versions of Unity or perhaps for certain platforms/API versions?
2. If UnityWebRequest is still the recommended solution, do I need to use game objects to poll things like leaderboards or can I work on background threads somehow?
Thanks.
I would also like a clarification on this. And what is the recommendation.
Also, There is a discrepency between the selected Request Type in the Playfab Extension and in the PlayFabSharedSettings. Selecting one does not match on the other side.
This probably due to the fact the PlayfabSettings.WebRequestType does not match PlayfabEditorSettings.WebRequest Type because of the ifdefs.
@Jean-Baptiste Lai For discrepency, it is suggested to use the one in the shared settings https://community.playfab.com/questions/59724/request-type-shared-settings-vs-editor-extensions.html
1 Person is following this question.