Example #1
0
        public static void Initialize(string key, Action <string> onInitializeSuccess,
                                      Action <TapsellPlusAdNetworkError> onInitializeFailed)
        {
            if (_tapsellPlusManager != null)
            {
                return;
            }
            _tapsellPlusManager = new GameObject("TapsellPlusManager");
            Object.DontDestroyOnLoad(_tapsellPlusManager);
            _tapsellPlusManager.AddComponent <TapsellPlusMessageHandler>();

            _plugin = new TapsellPlusPlugin();
#if UNITY_ANDROID && !UNITY_EDITOR
            _plugin = new TapsellPlusAndroidPlugin();
#endif

            _successInitializeCallback = onInitializeSuccess;
            _failedInitializeCallback  = onInitializeFailed;
            _plugin.Initialize(key);
        }
        public static void initialize(string key)
        {
            if (tapsellPlusManager == null)
            {
                tapsellPlusManager = new GameObject("TapsellPlusManager");
                UnityEngine.Object.DontDestroyOnLoad(tapsellPlusManager);
                tapsellPlusManager.AddComponent <TapsellPlusMessageHandler> ();

                plugin = new TapsellPlusPlugin();
                                #if UNITY_ANDROID && !UNITY_EDITOR
                plugin = new TapsellPlusAndroidPlugin();
                                #endif

                                #if UNITY_IOS && !UNITY_EDITOR
                plugin = new TapsellPlusIOSPlugin();
                                #endif

                plugin.initialize(key);
            }
        }