ConsentInformation
The ConsentInformation class provides methods to check the current consent status, request consent information updates, and reset consent state. Access it via UserMessagingPlatform.consent_information (GDScript) or UserMessagingPlatform.ConsentInformation (C#).
Enums
| Enum | Description |
|---|---|
| ConsentStatus | Indicates the user's consent status. |
| PrivacyOptionsRequirementStatus | Indicates whether privacy options are required. |
Methods
get_consent_status / GetConsentStatus
Returns the current consent status of the user.
get_is_consent_form_available / GetIsConsentFormAvailable
Returns whether a consent form is available to load.
get_privacy_options_requirement_status / GetPrivacyOptionsRequirementStatus
Returns whether the user is required to be presented with privacy options.
update / Update
Requests a consent information update with the given parameters.
func update(
consent_request: ConsentRequestParameters,
on_consent_info_updated_success := func(): pass,
on_consent_info_updated_failure := func(form_error: FormError): pass
) -> void
Usage:
var request_params := ConsentRequestParameters.new()
request_params.tag_for_under_age_of_consent = false
UserMessagingPlatform.consent_information.update(
request_params,
func():
print("Consent info updated successfully")
,
func(form_error: FormError):
print("Failed to update consent info: ", form_error.message)
)
reset / Reset
Resets the consent state to undetermined.