/** * Async show GDPR consent and wait for user response * We are using UnitySimpleGDPRConsent open source package for faster display * @see: https://github.com/yasirkula/UnitySimpleGDPRConsent */ private IEnumerator AskForConsentAndInit() { // Show a consent dialog with two sections (and wait for the dialog to be closed): yield return(SimpleGDPR.WaitForDialog(new GDPRConsentDialog(). AddSectionWithToggle(ADS_PERSONALIZATION_CONSENT, "Ads Personalization", "When enabled, you'll see ads that are more relevant to you. Otherwise, you will still receive ads, but they will no longer be tailored toward you."). AddPrivacyPolicies("https://policies.google.com/privacy", "https://unity3d.com/legal/privacy-policy", "https://my.policy.url"))); // Check if user has granted the Ads Personalization permission before closing the dialog if (SimpleGDPR.GetConsentState(ADS_PERSONALIZATION_CONSENT) == SimpleGDPR.ConsentState.Yes) { // User accepted VoodooSauce.Initialize("f4280fh0318rf0h2", true); VoodooSauce.StartGame(); } else { // User denied VoodooSauce.Initialize("f4280fh0318rf0h2", false); VoodooSauce.StartGame(); } }
private void StartGameClick() { VoodooSauce.StartGame(); }