docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method IsConsentGiven

    IsConsentGiven()

    Checks if the consent was given. If the required legislation is PIPL, it takes priority over any other legislation. Even if the user opted out from CCPA/GDPR/etc, but gave consent for PIPL, this method will return true. If PIPL is not required, the method does not take into account PIPL consent status. It requires CheckGeoIP method to be called beforehand.

    Declaration
    public bool IsConsentGiven()
    Returns
    Type Description
    bool

    A boolean value whether the required consent was given.

    Implements
    IConsentTracker.IsConsentGiven()
    Exceptions
    Type Condition
    ConsentCheckException

    Thrown if the required consent flow cannot be determined.

    IsConsentGiven(string)

    Checks if the consent was given for the specified legislation (either explicitly given for PIPL or Unknown for opt-out flag). This method does not take into account the geolocation.

    As we currently do not store opt-out-based legislation as separate flags, if the identifier is not PIPL, the method checks the opt-out consent flag.

    Declaration
    public bool IsConsentGiven(string identifier)
    Parameters
    Type Name Description
    string identifier

    The identifier of the legislation.

    Returns
    Type Description
    bool

    The boolean value whether the consent was given.

    Implements
    IConsentTracker.IsConsentGiven(string)
    In This Article
    Back to top
    Copyright © 2024 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)