docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetUserConsentStatus

    SetUserConsentStatus(string, bool)

    Sets the consent status for the specified legislation identifier and saves it in Player Preferences. At the moment, it only works for PIPL (as every other legislation we track is opt-out based only, so we do not need to track whether the consent was explicitly given, and other legislation statuses are not separately stored).

    Declaration
    public void SetUserConsentStatus(string identifier, bool consentGiven)
    Parameters
    Type Name Description
    string identifier

    The legislation identifier for which the consent status should be changed.

    bool consentGiven

    The consent status which should be set for the specified legislation.

    Implements
    IConsentTracker.SetUserConsentStatus(string, bool)
    Exceptions
    Type Condition
    ConsentCheckException

    Thrown if the incorrect legislation was being provided or the required consent flow cannot be determined.

    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)