If you pass precise location data of your users to Google, the
Google Publisher Policies
provides you with consent requirements and a notice.
If this policy applies to you, the following example sets the title, message,
and button text to inform your users of data sharing:
[SerializeField, Tooltip("Canvas panel for the location consent overlay.")]privateGameObject_consentOverlay;[SerializeField, Tooltip("Title text for the location consent overlay.")]privateText_titleText;[SerializeField, Tooltip("Message text for the location consent overlay.")]privateText_messageText;[SerializeField, Tooltip("OK button for the location consent overlay.")]privateButton_okButton;[SerializeField, Tooltip("OK button text for the location consent overlay.")]privateText_okButtonText;/// <summary>/// Presents the location consent overlay to the user./// </summary>publicvoidPresentConsentOverlay(){if(_consentOverlay==null){return;}_titleText.text="TITLE";_messageText.text="MESSAGE_TEXT";_okButtonText.text="BUTTON_TEXT";_okButton.onClick.RemoveAllListeners();_okButton.onClick.AddListener(()=>
{_consentOverlay.SetActive(false);// TODO: Add any consent gathering logic.Debug.Log("CONSENT_RECEIVED_LOG_MESSAGE");});_consentOverlay.SetActive(true);}
Replace the following:
TITLE: the title of the consent dialog, for example,
Location data.
MESSAGE_TEXT: the text of the consent dialog, for
example:
We may use your location and share with third parties for the
purposes of personalized advertising, analytics, and attributions. To learn
more, visit our privacy policy at example.com.
BUTTON_TEXT: the text of the consent dialog button,
for example, OK.
CONSENT_RECEIVED_LOG_MESSAGE: the log message to
record when the user gives consent, for example, Consent received.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-10-16 UTC."],[],[]]