Newsletter.BfgNewsletterWrapper Class
Static Public Member Functions | |
| static void | Initialize (string gameObjectListener, string callback) |
| Initializes the newsletter consent system for the current platform. Should be called once during application startup, passing the name of the Unity GameObject and the callback method that will receive the result (e.g., "OnNewsletterConsentSelected"). More... | |
| static NewsletterConsentData | GetNewsletterConsent () |
| Retrieves the user's newsletter consent status from native code. This includes the status (Consented, Denied, Unknown) and an associated timestamp. More... | |
| static void | ShowNewsletterConsentScreen () |
| Displays the newsletter consent screen to the user. This prompts the user to either consent or decline receiving newsletters, if supported on the current platform. | |
Member Function Documentation
◆ GetNewsletterConsent()
| inlinestatic |
Retrieves the user's newsletter consent status from native code. This includes the status (Consented, Denied, Unknown) and an associated timestamp.
- Returns
- A NewsletterConsentData struct containing the consent status and timestamp. Returns Unknown status and empty timestamp if unsupported or not initialized.
◆ Initialize()
| inlinestatic |
Initializes the newsletter consent system for the current platform. Should be called once during application startup, passing the name of the Unity GameObject and the callback method that will receive the result (e.g., "OnNewsletterConsentSelected").
- Parameters
gameObjectListener The name of the GameObject that will receive the callback. callback The name of the method to call with the consent result.
Static Public Member Functions | |
| static void | Initialize (string gameObjectListener, string callback) |
| Initializes the newsletter consent system for the current platform. Should be called once during application startup, passing the name of the Unity GameObject and the callback method that will receive the result (e.g., "OnNewsletterConsentSelected"). More... | |
| static NewsletterConsentData | GetNewsletterConsent () |
| Retrieves the user's newsletter consent status from native code. This includes the status (Consented, Denied, Unknown) and an associated timestamp. More... | |
| static void | ShowNewsletterConsentScreen () |
| Displays the newsletter consent screen to the user. This prompts the user to either consent or decline receiving newsletters, if supported on the current platform. | |
Member Function Documentation
◆ GetNewsletterConsent()
| inlinestatic |
Retrieves the user's newsletter consent status from native code. This includes the status (Consented, Denied, Unknown) and an associated timestamp.
- Returns
- A NewsletterConsentData struct containing the consent status and timestamp. Returns Unknown status and empty timestamp if unsupported or not initialized.
◆ Initialize()
| inlinestatic |
Initializes the newsletter consent system for the current platform. Should be called once during application startup, passing the name of the Unity GameObject and the callback method that will receive the result (e.g., "OnNewsletterConsentSelected").
- Parameters
gameObjectListener The name of the GameObject that will receive the callback. callback The name of the method to call with the consent result.