Hello!
I’ve assigned this as a bug, but it could equally be argued as implementation.
So one of my test scenarios with the new Analytics was to run it in offline (airplane) mode.
When doing so I observed…
UnityServices.InitializeAsync() initialised after 1 second with a State of Initialised (which is great)
Events.CheckForRequiredConsents() failed after 10 seconds (fair enough, it needs a geo-lookup call)
However, when then calling Events.Flush() it throws the following exception (I’m assuming auto flush does the same)…
ConsentCheckException: The required consent flow cannot be determined. Make sure GeoIP was successfully called.
So this means all calls to Flush() need to be wrapped with exception handling, which is a pain. Could this not be built into the API please?
Or isn’t there a case for supressing consent checks if required consents could not be determined? Or a fallback is device locale? Or a cached locale from a previous online session? Given it requires a UI and player input, anything other than on app init is not going to work well.
Basically, the demo code pattern showing await Events.CheckForRequiredConsents() causes knock on effects when in offline mode and I can see this catching a lot of people out.