internal static void SetMediationExtras()
        {
            var consent = PlayerPrefs.GetString(consentStringPref, "");

            if (consent.Length == 0 || consent == consentDenied || consent == consentAccepted)
            {
                return;
            }

            var active = MobileAds.GetActiveNetworks();

            if (active.Length != consent.Length)
            {
                return;
            }
            var result = new Dictionary <string, string>();

            for (int i = 0; i < consent.Length; i++)
            {
                if (consent[i] != '-')
                {
                    var tag = GetNetworkTag(active[i]);
                    result[tag + "_gdpr"] = consent[i].ToString();
                    //result[tag + "_ccpa"] = consent[i].ToString();
                }
            }
            if (result.Count > 0)
            {
                MediationExtras.SetGlobalEtras(result);
            }
        }
        private IEnumerator Start()
        {
            string[] privacyPolicyList =
            {
                "https://policies.google.com/technologies/ads",
                "https://vungle.com/privacy/",
                "https://kidoz.net/privacy-policy/",
                "https://answers.chartboost.com/en-us/articles/200780269",
                "https://unity3d.com/legal/privacy-policy",
                "https://www.applovin.com/privacy/",
                "https://www.superawesome.com/privacy-hub/privacy-policy/",
                "https://www.startapp.com/policy/privacy-policy/",
                "https://www.adcolony.com/privacy-policy/",
                "https://developers.facebook.com/docs/audience-network/policy/",
                "https://www.inmobi.com/privacy-policy/",
                "https://www.mobfox.com/privacy-policy/",
                "https://legal.my.com/us/mytarget/privacy/",
                null,
                "https://developers.ironsrc.com/ironsource-mobile/air/ironsource-mobile-privacy-policy/",
                "https://yandex.com/legal/mobileads_sdk_agreement/",
                null,
                "https://advertising.amazon.com/legal/privacy-notice",
                "https://www.verizonmedia.com/policies/us/en/verizonmedia/privacy/",
                "https://www.mopub.com/en/legal/privacy",
                "https://www.tapjoy.com/legal/players/privacy-policy/",
                null,
                "https://www.fyber.com/privacy-policy/",
                "https://www.mintegral.com/en/privacy/"
            };

            yield return(null);

            var active = MobileAds.GetActiveNetworks();

            items = new MediationPolicyUI[active.Length];

            for (int i = 0; i < active.Length && i < privacyPolicyList.Length; i++)
            {
                var policy = privacyPolicyList[( int )active[i]];
                if (policy != null)
                {
                    var netName = active[i].ToString();
                    if (netName.Length > 2)
                    {
                        var item = Instantiate(policyPrefab, container, false);
                        item.network = active[i];
                        item.SetPrivacyPolicyUrl(policy);
                        items[i] = item;
                        yield return(null);
                    }
                }
            }
            initialized = true;
        }
        internal static ConsentStatus GetStatus()
        {
            var consent = PlayerPrefs.GetString(consentStringPref, "");

            if (consent.Length == 0)
            {
                return(ConsentStatus.Undefined);
            }
            if (consent == consentDenied)
            {
                return(ConsentStatus.Denied);
            }
            if (consent == consentAccepted)
            {
                return(ConsentStatus.Accepted);
            }
            var active = MobileAds.GetActiveNetworks();

            if (active.Length != consent.Length)
            {
                return(ConsentStatus.Undefined);
            }
            return(ConsentStatus.Denied);
        }