Description
Hello, seeing odd behavior after integrating this plugin in a game previously working with AdMob & UMP. Bottom line up front: the AdMob UMP Consent Flow never executes the callback provided to GatherConsent, although this was working prior to plugin integration. It appears to be a conflict with updating the consent info in UpdateConsent based on what is/is not executing.
The game builds clean. Unity Version is 2022.3.55f1, AdMob 9.4.0., none of the admob consent flow code was changed.
*update - behavior consistent when admob/GMA for Unity updated to 10.1.0
To Reproduce
Steps to reproduce the behavior:
- Build a game with the above unity version and get AdMob working with UMP integrated into the initialization flow
- Add this package v2.0.0
- Build and upload to Play Console on an internal test track
- Try to start the game
Expected behavior
The consent flow should execute the provided callback.
Observed behavior
The game hangs before completing consent flow. After troubleshooting it looks like the code execution stops according to the in-line comments below
//in AdController
_consentController.GatherConsent((string error) =>
{
//code here does not execute
});
//in AdConsentController
public void GatherConsent(Action<string> onComplete)
{
Debug.Log("Gathering consent."); //THIS EXECUTES
var requestParameters = new ConsentRequestParameters {/*removed for brevity*/};
onComplete = (onComplete == null)
? UpdateErrorPopup
: onComplete + UpdateErrorPopup;
Debug.Log("Ad Consent update..."); //THIS EXECUTES
ConsentInformation.Update(requestParameters, (FormError updateError) =>
{
Debug.Log("Updating consent information."); //THIS DOES NOT EXECUTE
/*flow logic code removed for brevity*/
// Consent not obtained and is required.
// Load the initial consent request form for the user.
ConsentForm.LoadAndShowConsentFormIfRequired((FormError showError) =>
{
UpdatePrivacyButton();
if (showError != null)
{
/*flow logic code removed for brevity*/
if (onComplete != null) onComplete(showError.Message);
} else if (onComplete != null) onComplete(null);
});
});
Debug.Log("Gather ad consent complete"); //THIS DOES NOT EXECUTE
}
Versions
- Unity version: 2022.3.55f1
- Google Play Games Plugin for Unity version: 2.0.0
- AdMob v 9.4.0