protected override void InternalInit()
        {
            #if EM_IRONSOURCE
            mIsInitialized = true;
            mAdSettings    = EM_Settings.Advertising.IronSource;

            // Set GDPR consent (if any) *before* initializing the SDK as recommended at
            // https://developers.ironsrc.com/ironsource-mobile/android/advanced-settings/#step-1
            var consent = GetApplicableDataPrivacyConsent();
            ApplyDataPrivacyConsent(consent);

            // Advanced settings.
            if (mAdSettings.UseAdvancedSetting)
            {
                SetupAdvancedSetting(mAdSettings);
            }

            // IronSource requires a gameObject to pass the OnApplicationPause event to it agent.
            GameObject appStateHandler = new GameObject("IronSourceAppStateHandler");
            appStateHandler.hideFlags = HideFlags.HideAndDontSave;
            appStateHandler.AddComponent <Internal.IronSourceAppStateHandler>();

            IronSource.Agent.init(mAdSettings.AppId.Id);

            /// Add event callbacks.
            IronSourceEvents.onBannerAdClickedEvent         += OnBannerAdClicked;
            IronSourceEvents.onBannerAdLeftApplicationEvent += OnBannerAdLeftApplication;
            IronSourceEvents.onBannerAdLoadedEvent          += OnBannerAdLoaded;
            IronSourceEvents.onBannerAdLoadFailedEvent      += OnBannerAdLoadFailed;

            IronSourceEvents.onInterstitialAdClickedEvent       += OnInterstitialAdClicked;
            IronSourceEvents.onInterstitialAdClosedEvent        += OnInterstititalAdClosed;
            IronSourceEvents.onInterstitialAdLoadFailedEvent    += OnInterstitialAdLoadFailed;
            IronSourceEvents.onInterstitialAdOpenedEvent        += OnInterstitialAdOpened;
            IronSourceEvents.onInterstitialAdReadyEvent         += OnInterstitialAdReady;
            IronSourceEvents.onInterstitialAdShowSucceededEvent += OnInterstitialAdShowSucceeded;
            IronSourceEvents.onInterstitialAdShowFailedEvent    += OnInterstitialAdShowFailed;

            IronSourceEvents.onRewardedVideoAdClickedEvent           += OnRewardedVideoAdClicked;
            IronSourceEvents.onRewardedVideoAdClosedEvent            += OnRewardedVideoClosed;
            IronSourceEvents.onRewardedVideoAdEndedEvent             += OnRewardedVideoAdEnded;
            IronSourceEvents.onRewardedVideoAdOpenedEvent            += OnRewardedVideoAdOpened;
            IronSourceEvents.onRewardedVideoAdRewardedEvent          += OnRewardedVideoAdRewarded;
            IronSourceEvents.onRewardedVideoAdShowFailedEvent        += OnRewardedVideoAdShowFailed;
            IronSourceEvents.onRewardedVideoAdStartedEvent           += OnRewardedVideoAdStarted;
            IronSourceEvents.onRewardedVideoAvailabilityChangedEvent += OnRewardedVideoAvailabilityChanged;

            IronSourceEvents.onSegmentReceivedEvent += OnSegmentReceived;

            Debug.Log("ironSource client has been initialized.");
            #endif
        }
 protected virtual void SetupAdvancedSetting(IronSourceSettings adSettings)
 {
     #if EM_IRONSOURCE
     SetupSegment(adSettings.Segments);
     #endif
 }