docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IDataPrivacy

    DataPrivacy is an interface that is used to register the user's consent status.

    Namespace: Unity.Services.Mediation
    Assembly: Unity.Mediation.dll
    Syntax
    public interface IDataPrivacy

    Methods

    GetConsentStatusForLaw(DataPrivacyLaw)

    Gets the consent status for a given data privacy law.

    Declaration
    ConsentStatus GetConsentStatusForLaw(DataPrivacyLaw dataPrivacyLaw)
    Parameters
    Type Name Description
    DataPrivacyLaw dataPrivacyLaw

    The data privacy law for which we want to know the consent status.

    Returns
    Type Description
    ConsentStatus

    Returns the consent status for the given data privacy law.

    UserGaveConsent(ConsentStatus, DataPrivacyLaw)

    Notify the sdk if personal information can be legally collected.

    Declaration
    void UserGaveConsent(ConsentStatus consent, DataPrivacyLaw dataPrivacyLaw)
    Parameters
    Type Name Description
    ConsentStatus consent

    The value should be ConsentStatus.NotDetermined by default, ConsentStatus.Given if the user accepted and is above the age of consent, in any other case, or ConsentStatus.Denied if the user refused or is not above the age of consent.

    DataPrivacyLaw dataPrivacyLaw

    Defines which law the consent status is applicable to

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)