Unity Event API¶
Consent Listener¶
Subscribe¶
Subscribe to any consent updated event that happens within Usercentrics SDK This API is meant for third-parties, that need to pull consent from the Usercentrics SDK.
Usercentrics.Instance.SubscribeOnConsentUpdated((consentEvent) => {
// Handle consentEvent
});
ConsentEvent¶
| Property | Type | Notes |
|---|---|---|
| consents | UsercentricsServiceConsent | List of Services with consent choices. |
| controllerId | String | A Usercentrics generated ID, used to identify a specific user. See Restore User Session |
| tcString | String | IAB's Transparency & Consent String |
| uspString | String | IAB's US Privacy String |
UsercentricsServiceConsent¶
| Property | Type | Notes |
|---|---|---|
| templateId | String | ID used to match a service with frameworks running on your app. |
| status | Bool | Consent status given to this specific service. |
| dataProcessor | String | Name of entity processing the data that was collected via this service. |
| version | String | Legal template version. See Service Settings. |
Dispose Listener¶
Dispose any subscription to this API.
Usercentrics.Instance.DisposeOnConsentUpdatedSubscription();
Mediation Listener¶
Subscribe¶
Subscribe to any mediation event that happens within Usercentrics SDK
Usercentrics.Instance.SubscribeOnConsentMediation((mediationEvent) => {
// Handle mediationEvent
});
MediationEvent¶
| Property | Type | Notes |
|---|---|---|
| applied | ConsentApplied | List of Consent Applied payload. |
ConsentApplied¶
| Property | Type | Notes |
|---|---|---|
| name | String | Name of the SDK mediated. |
| templateId | String | Template ID that represents the SDK. |
| consent | Bool | Consent status given to this specific service. |
| mediated | Bool | Mediation success status. |
Dispose Listener¶
Dispose any subscription to this API.
Usercentrics.Instance.DisposeOnConsentMediation();