Exemple #1
0
        public void AddAnalytics(IAnalytics analytics)
        {
            RunIfInitialized(() =>
            {
                if (!_hasAnalyticsBinding)
                {
                    _adsBinding.CreateAnalyticsBinding();
                    _hasAnalyticsBinding = true;
                }

                ScaleMonkAdsMonoBehavior.AddAnalytics(analytics);
            });
        }
Exemple #2
0
        /// <summary>
        /// Initialize ScaleMonk SDK
        ///
        /// <param name="callback">The callback that will be called after the ScaleMonk SDK is initialized</param>
        /// </summary>
        public static void Initialize(Action callback)
        {
            if (_isInitialized)
            {
                AdsLogger.LogWarning("{0} | Ads SDK already initialized", _label);
                return;
            }

            AdsLogger.LogWithFormat("{0} | Initializing Ads SDK", _label);

            _instance               = SharedInstance;
            _isInitialized          = true;
            _initializationCallback = callback;

            ScaleMonkAdsMonoBehavior.Initialize(_instance);
            _instance.InitializeInternal();
        }