Exemplo n.º 1
0
    public void Init()
    {
        Debug.Log("unity-script: IronSource.Agent.validateIntegration");
        IronSource.Agent.validateIntegration();

        Debug.Log("unity-script: unity version" + IronSource.unityVersion());

        // SDK init
        Debug.Log("unity-script: IronSource.Agent.init");
        IronSource.Agent.init(_appKey);
        #region Interstitial
        IronSourceEvents.onInterstitialAdReadyEvent         += InterstitialAdReadyEvent;
        IronSourceEvents.onInterstitialAdLoadFailedEvent    += InterstitialAdLoadFailedEvent;
        IronSourceEvents.onInterstitialAdShowSucceededEvent += InterstitialAdShowSucceededEvent;
        IronSourceEvents.onInterstitialAdShowFailedEvent    += InterstitialAdShowFailedEvent;
        IronSourceEvents.onInterstitialAdClickedEvent       += InterstitialAdClickedEvent;
        IronSourceEvents.onInterstitialAdOpenedEvent        += InterstitialAdOpenedEvent;
        IronSourceEvents.onInterstitialAdClosedEvent        += InterstitialAdClosedEvent;
        #endregion

        #region Rewarded
        IronSourceEvents.onRewardedVideoAdOpenedEvent            += RewardedVideoAdOpenedEvent;
        IronSourceEvents.onRewardedVideoAdClosedEvent            += RewardedVideoAdClosedEvent;
        IronSourceEvents.onRewardedVideoAvailabilityChangedEvent += RewardedVideoAvailabilityChangedEvent;
        IronSourceEvents.onRewardedVideoAdStartedEvent           += RewardedVideoAdStartedEvent;
        IronSourceEvents.onRewardedVideoAdEndedEvent             += RewardedVideoAdEndedEvent;
        IronSourceEvents.onRewardedVideoAdRewardedEvent          += RewardedVideoAdRewardedEvent;
        IronSourceEvents.onRewardedVideoAdShowFailedEvent        += RewardedVideoAdShowFailedEvent;
        IronSourceEvents.onRewardedVideoAdClickedEvent           += RewardedVideoAdClickedEvent;

        #endregion
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        Instance = this;

        Debug.Log("MyAppStart Start called");

        //IronSource tracking sdk
        IronSource.Agent.reportAppStarted();

        //Dynamic config example
        IronSourceConfig.Instance.setClientSideCallbacks(true);

        string id = IronSource.Agent.getAdvertiserId();

        Debug.Log("IronSource.Agent.getAdvertiserId : " + id);

        Debug.Log("IronSource.Agent.validateIntegration");
        IronSource.Agent.validateIntegration();

        Debug.Log("unity version" + IronSource.unityVersion());

        //SDK init
        Debug.Log("IronSource.Agent.init");
        IronSource.Agent.setUserId("uniqueUserId");
        IronSource.Agent.init(appKey);
        //IronSource.Agent.init (appKey, IronSourceAdUnits.REWARDED_VIDEO, IronSourceAdUnits.INTERSTITIAL, IronSourceAdUnits.BANNER);
        IronSource.Agent.init(appKey, IronSourceAdUnits.REWARDED_VIDEO, IronSourceAdUnits.INTERSTITIAL);
        //IronSource.Agent.init(appKey, IronSourceAdUnits.REWARDED_VIDEO);


        IronSourceEvents.onBannerAdLoadedEvent          += BannerAdLoadedEvent;
        IronSourceEvents.onBannerAdLoadFailedEvent      += BannerAdLoadFailedEvent;
        IronSourceEvents.onBannerAdClickedEvent         += BannerAdClickedEvent;
        IronSourceEvents.onBannerAdScreenPresentedEvent += BannerAdScreenPresentedEvent;
        IronSourceEvents.onBannerAdScreenDismissedEvent += BannerAdScreenDismissedEvent;
        IronSourceEvents.onBannerAdLeftApplicationEvent += BannerAdLeftApplicationEvent;

        IronSourceEvents.onInterstitialAdReadyEvent         += InterstitialAdReadyEvent;
        IronSourceEvents.onInterstitialAdLoadFailedEvent    += InterstitialAdLoadFailedEvent;
        IronSourceEvents.onInterstitialAdShowSucceededEvent += InterstitialAdShowSucceededEvent;
        IronSourceEvents.onInterstitialAdShowFailedEvent    += InterstitialAdShowFailEvent;
        IronSourceEvents.onInterstitialAdClickedEvent       += InterstitialAdClickedEvent;
        IronSourceEvents.onInterstitialAdOpenedEvent        += InterstitialAdOpenedEvent;
        IronSourceEvents.onInterstitialAdClosedEvent        += InterstitialAdClosedEvent;


        IronSourceEvents.onRewardedVideoAdOpenedEvent            += RewardedVideoAdOpenedEvent;
        IronSourceEvents.onRewardedVideoAdClosedEvent            += RewardedVideoAdClosedEvent;
        IronSourceEvents.onRewardedVideoAvailabilityChangedEvent += RewardedVideoAvailabilityChangedEvent;
        IronSourceEvents.onRewardedVideoAdStartedEvent           += RewardedVideoAdStartedEvent;
        IronSourceEvents.onRewardedVideoAdEndedEvent             += RewardedVideoAdEndedEvent;
        IronSourceEvents.onRewardedVideoAdRewardedEvent          += RewardedVideoAdRewardedEvent;
        IronSourceEvents.onRewardedVideoAdShowFailedEvent        += RewardedVideoAdShowFailedEvent;
        IronSourceEvents.onRewardedVideoAdClickedEvent           += RewardedVideoAdClickedEvent;

        //GameHelper.Instance.gameStart.Progress = Random.Range(0.4f, 0.6f);


        //LoadInterstitial();
    }
Exemplo n.º 3
0
    private void Start()
    {
        UnityEngine.Debug.Log("unity-script: MyAppStart Start called");
        IronSourceConfig.Instance.setClientSideCallbacks(status: true);
        string advertiserId = IronSource.Agent.getAdvertiserId();

        UnityEngine.Debug.Log("unity-script: IronSource.Agent.getAdvertiserId : " + advertiserId);
        UnityEngine.Debug.Log("unity-script: IronSource.Agent.validateIntegration");
        IronSource.Agent.validateIntegration();
        UnityEngine.Debug.Log("unity-script: unity version" + IronSource.unityVersion());
        UnityEngine.Debug.Log("unity-script: IronSource.Agent.init");
        IronSource.Agent.setUserId(SystemInfo.deviceUniqueIdentifier);
        IronSource.Agent.init(appKey);
    }
Exemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
                #if UNITY_ANDROID
        string appKey = "85460dcd";
                #elif UNITY_IPHONE
        string appKey = "8545d445";
                #else
        string appKey = "unexpected_platform";
                #endif
        Debug.Log("unity-script: MyAppStart Start called");

        //Dynamic config example
        IronSourceConfig.Instance.setClientSideCallbacks(true);

        string id = IronSource.Agent.getAdvertiserId();
        Debug.Log("unity-script: IronSource.Agent.getAdvertiserId : " + id);

        Debug.Log("unity-script: IronSource.Agent.validateIntegration");
        IronSource.Agent.validateIntegration();

        Debug.Log("unity-script: unity version" + IronSource.unityVersion());

        // Add Banner Events
        IronSourceEvents.onBannerAdLoadedEvent          += BannerAdLoadedEvent;
        IronSourceEvents.onBannerAdLoadFailedEvent      += BannerAdLoadFailedEvent;
        IronSourceEvents.onBannerAdClickedEvent         += BannerAdClickedEvent;
        IronSourceEvents.onBannerAdScreenPresentedEvent += BannerAdScreenPresentedEvent;
        IronSourceEvents.onBannerAdScreenDismissedEvent += BannerAdScreenDismissedEvent;
        IronSourceEvents.onBannerAdLeftApplicationEvent += BannerAdLeftApplicationEvent;

        // SDK init
        Debug.Log("unity-script: IronSource.Agent.init");
        IronSource.Agent.init(appKey);
        //IronSource.Agent.init (appKey, IronSourceAdUnits.REWARDED_VIDEO, IronSourceAdUnits.INTERSTITIAL, IronSourceAdUnits.OFFERWALL, IronSourceAdUnits.BANNER);
        //IronSource.Agent.initISDemandOnly (appKey, IronSourceAdUnits.REWARDED_VIDEO, IronSourceAdUnits.INTERSTITIAL);

        //Set User ID For Server To Server Integration
        //// IronSource.Agent.setUserId ("UserId");

        // Load Banner example
        IronSource.Agent.loadBanner(IronSourceBannerSize.BANNER, IronSourceBannerPosition.BOTTOM);
    }
Exemplo n.º 5
0
    private void Start()
    {
#if UNITY_ANDROID
        string appKey = "d3f5db65";
#elif UNITY_IPHONE
        string appKey = "d3f5a1dd";
#else
        string appKey = "unexpected_platform";
#endif

        Debug.Log("unity-script: IronSource.Agent.validateIntegration");
        IronSource.Agent.validateIntegration();

        Debug.Log("unity-script: unity version" + IronSource.unityVersion());

        // SDK init
        Debug.Log("unity-script: IronSource.Agent.init");
        IronSource.Agent.init(appKey);

        LoadInterstitial();
    }
Exemplo n.º 6
0
    public void Start()
    {
#if UNITY_ANDROID
        string appKey = "85460dcd";
#elif UNITY_IPHONE
        string appKey = "8545d445";
#else
        string appKey = "unexpected_platform";
#endif



        Debug.Log("unity-script: IronSource.Agent.validateIntegration");
        IronSource.Agent.validateIntegration();

        Debug.Log("unity-script: unity version" + IronSource.unityVersion());

        // SDK init
        Debug.Log("unity-script: IronSource.Agent.init");
        IronSource.Agent.init(appKey);
    }
Exemplo n.º 7
0
    public void Init(string appKey)
    {
        EzDebug.Log("unity-script: MyAppStart Start called");

        IronSource.Agent.shouldTrackNetworkState(true);
#if UNITY_EDITOR
        _onAvailability(true);
#endif

#if JX_DEBUG
        EzDebug.Log("unity-script: IronSource.Agent.validateIntegration");
        IronSource.Agent.validateIntegration();
#endif
        EzDebug.Log("unity-script: unity version" + IronSource.unityVersion());

        EzDebug.Log("unity-script: IronSource.Agent.init");
        IronSource.Agent.init(appKey, IronSourceAdUnits.REWARDED_VIDEO, IronSourceAdUnits.INTERSTITIAL);
        InitRewardAdsEvent();
        InitIntersAdEvent();
        IronSource.Agent.loadInterstitial();
    }
Exemplo n.º 8
0
        private void InitAd()
        {
#if UNITY_ANDROID
            string appKey = "ec7e5079";
#elif UNITY_IPHONE
            string appKey = "f12b7571";
#else
            string appKey = "f12b7571";
#endif


            LogUtils.Log("unity-script: IronSource.Agent.validateIntegration");
            IronSource.Agent.validateIntegration();

            LogUtils.Log("unity-script: unity version" + IronSource.unityVersion());

            // SDK init
            LogUtils.Log("unity-script: IronSource.Agent.init");
            IronSource.Agent.init(appKey);

            StartLoadingAds();
        }
Exemplo n.º 9
0
    public override void Init()
    {
#if IRONSOURCE
        IronSource.Agent.init(appKey, IronSourceAdUnits.REWARDED_VIDEO, IronSourceAdUnits.INTERSTITIAL, IronSourceAdUnits.BANNER);
        IronSource.Agent.shouldTrackNetworkState(true);
        IronSource.Agent.setConsent(true);
#if DEBUG
        IronSource.Agent.validateIntegration();
        IronSource.Agent.setAdaptersDebug(true);
        LDebug.Log(IronSource.pluginVersion());
        LDebug.Log(IronSource.unityVersion());
#endif
#endif

        LitFramework.LitTool.LitTool.DelayPlayFunction(0.1f, () =>
        {
            //if (AdManager.Instance.UseAds)
            //    CreateBanner();
            CreateInterstitial();
            CreateRewarded();
        });
    }
Exemplo n.º 10
0
    // Use this for initialization
    void Start()
    {
        Debug.Log("MyAppStart Start called");

        //IronSource tracking sdk
        IronSource.Agent.reportAppStarted();

        //Dynamic config example
        IronSourceConfig.Instance.setClientSideCallbacks(true);

        string id = IronSource.Agent.getAdvertiserId();

        Debug.Log("IronSource.Agent.getAdvertiserId : " + id);

        Debug.Log("IronSource.Agent.validateIntegration");
        IronSource.Agent.validateIntegration();

        Debug.Log("unity version" + IronSource.unityVersion());

        // Add Banner Events
        //IronSourceEvents.onBannerAdLoadedEvent += BannerAdLoadedEvent;
        //IronSourceEvents.onBannerAdLoadFailedEvent += BannerAdLoadFailedEvent;
        //IronSourceEvents.onBannerAdClickedEvent += BannerAdClickedEvent;
        //IronSourceEvents.onBannerAdScreenPresentedEvent += BannerAdScreenPresentedEvent;
        //IronSourceEvents.onBannerAdScreenDismissedEvent += BannerAdScreenDismissedEvent;
        //IronSourceEvents.onBannerAdLeftApplicationEvent += BannerAdLeftApplicationEvent;

        //SDK init
        Debug.Log("IronSource.Agent.init");
        IronSource.Agent.setUserId("uniqueUserId");
        IronSource.Agent.init(appKey);
        //IronSource.Agent.init (appKey, IronSourceAdUnits.REWARDED_VIDEO, IronSourceAdUnits.INTERSTITIAL, IronSourceAdUnits.OFFERWALL, IronSourceAdUnits.BANNER);

        //Load Banner example
        //IronSource.Agent.loadBanner (IronSourceBannerSize.BANNER, IronSourceBannerPosition.BOTTOM);
    }
Exemplo n.º 11
0
    public void ConfigureIronSourceAds()
    {
        Debug.Log("unity-script: IronSource.Agent.validateIntegration");
        IronSource.Agent.validateIntegration();

        Debug.Log("unity-script: unity version" + IronSource.unityVersion());

        // SDK init
        Debug.Log("unity-script: IronSource.Agent.init");
        IronSource.Agent.init(appKey);

        // IronSource Imprssion Data with Revenue Callback
        IronSourceEvents.onImpressionSuccessEvent += ImpressionSuccessEvent;

        //Add Rewarded Video Events
        IronSourceEvents.onRewardedVideoAdOpenedEvent            += RewardedVideoAdOpenedEvent;
        IronSourceEvents.onRewardedVideoAdClosedEvent            += RewardedVideoAdClosedEvent;
        IronSourceEvents.onRewardedVideoAvailabilityChangedEvent += RewardedVideoAvailabilityChangedEvent;
        IronSourceEvents.onRewardedVideoAdStartedEvent           += RewardedVideoAdStartedEvent;
        IronSourceEvents.onRewardedVideoAdEndedEvent             += RewardedVideoAdEndedEvent;
        IronSourceEvents.onRewardedVideoAdRewardedEvent          += RewardedVideoAdRewardedEvent;
        IronSourceEvents.onRewardedVideoAdShowFailedEvent        += RewardedVideoAdShowFailedEvent;
        IronSourceEvents.onRewardedVideoAdClickedEvent           += RewardedVideoAdClickedEvent;
    }
Exemplo n.º 12
0
 public void init(string appKey, params string[] adUnits)
 {
     CFSetPluginData("Unity", IronSource.pluginVersion(), IronSource.unityVersion());
     CFInitWithAdUnits(appKey, adUnits);
 }
Exemplo n.º 13
0
 public void init(string appKey)
 {
     CFSetPluginData("Unity", IronSource.pluginVersion(), IronSource.unityVersion());
     CFInit(appKey);
 }
Exemplo n.º 14
0
 public void initISDemandOnly(string appKey, params string[] adUnits)
 {
     CFSetPluginData("Unity", IronSource.pluginVersion(), IronSource.unityVersion());
     Debug.Log("IntegrationHelper pluginVersion: " + IronSource.pluginVersion());
     CFInitISDemandOnly(appKey, adUnits);
 }
Exemplo n.º 15
0
 public void init(string appKey)
 {
     CFSetPluginData("Unity", IronSource.pluginVersion(), IronSource.unityVersion());
     Debug.Log("IntegrationHelper pluginVersion: " + IronSource.pluginVersion());
     CFInit(appKey);
 }
Exemplo n.º 16
0
 public void init(string appKey, params string[] adUnits)
 {
     getBridge().Call("setPluginData", "Unity", IronSource.pluginVersion(), IronSource.unityVersion());
     getBridge().Call("init", appKey, adUnits);
 }
Exemplo n.º 17
0
    void Start()
    {
        if (instance == null)
        {
            instance = this;
            DontDestroyOnLoad(this.gameObject);
        }
        else
        {
            Destroy(this.gameObject);
        }

        Debug.Log("unity-script: MyAppStart Start called");

        //IronSourceConfig.Instance.setClientSideCallbacks(true);

        string id = IronSource.Agent.getAdvertiserId();

        Debug.Log("unity-script: IronSource.Agent.getAdvertiserId : " + id);

        Debug.Log("unity-script: IronSource.Agent.validateIntegration");
        IronSource.Agent.validateIntegration();

        Debug.Log("unity-script: unity version" + IronSource.unityVersion());

        // Add Banner Events
        IronSourceEvents.onBannerAdLoadedEvent          += BannerAdLoadedEvent;
        IronSourceEvents.onBannerAdLoadFailedEvent      += BannerAdLoadFailedEvent;
        IronSourceEvents.onBannerAdClickedEvent         += BannerAdClickedEvent;
        IronSourceEvents.onBannerAdScreenPresentedEvent += BannerAdScreenPresentedEvent;
        IronSourceEvents.onBannerAdScreenDismissedEvent += BannerAdScreenDismissedEvent;
        IronSourceEvents.onBannerAdLeftApplicationEvent += BannerAdLeftApplicationEvent;

        // Add Interstitial Events
        IronSourceEvents.onInterstitialAdReadyEvent         += InterstitialAdReadyEvent;
        IronSourceEvents.onInterstitialAdLoadFailedEvent    += InterstitialAdLoadFailedEvent;
        IronSourceEvents.onInterstitialAdShowSucceededEvent += InterstitialAdShowSucceededEvent;
        IronSourceEvents.onInterstitialAdShowFailedEvent    += InterstitialAdShowFailedEvent;
        IronSourceEvents.onInterstitialAdClickedEvent       += InterstitialAdClickedEvent;
        IronSourceEvents.onInterstitialAdOpenedEvent        += InterstitialAdOpenedEvent;
        IronSourceEvents.onInterstitialAdClosedEvent        += InterstitialAdClosedEvent;

        IronSourceEvents.onRewardedVideoAdOpenedEvent            += RewardedVideoAdOpenedEvent;
        IronSourceEvents.onRewardedVideoAdClosedEvent            += RewardedVideoAdClosedEvent;
        IronSourceEvents.onRewardedVideoAvailabilityChangedEvent += RewardedVideoAvailabilityChangedEvent;
        IronSourceEvents.onRewardedVideoAdStartedEvent           += RewardedVideoAdStartedEvent;
        IronSourceEvents.onRewardedVideoAdEndedEvent             += RewardedVideoAdEndedEvent;


        // Add Interstitial DemandOnly Events
        IronSourceEvents.onInterstitialAdReadyDemandOnlyEvent      += InterstitialAdReadyDemandOnlyEvent;
        IronSourceEvents.onInterstitialAdLoadFailedDemandOnlyEvent += InterstitialAdLoadFailedDemandOnlyEvent;
        IronSourceEvents.onInterstitialAdShowFailedDemandOnlyEvent += InterstitialAdShowFailedDemandOnlyEvent;
        IronSourceEvents.onInterstitialAdClickedDemandOnlyEvent    += InterstitialAdClickedDemandOnlyEvent;
        IronSourceEvents.onInterstitialAdOpenedDemandOnlyEvent     += InterstitialAdOpenedDemandOnlyEvent;
        IronSourceEvents.onInterstitialAdClosedDemandOnlyEvent     += InterstitialAdClosedDemandOnlyEvent;

        // Add Rewarded Interstitial Events
        // IronSourceEvents.onInterstitialAdRewardedEvent += InterstitialAdRewardedEvent;

        // SDK init
        Debug.Log("unity-script: IronSource.Agent.init");
        IronSource.Agent.init(appKey);
        //IronSource.Agent.init (appKey, IronSourceAdUnits.REWARDED_VIDEO, IronSourceAdUnits.INTERSTITIAL, IronSourceAdUnits.OFFERWALL, IronSourceAdUnits.BANNER);
        //IronSource.Agent.initISDemandOnly (appKey, IronSourceAdUnits.REWARDED_VIDEO, IronSourceAdUnits.INTERSTITIAL);

        //Set User ID For Server To Server Integration
        //// IronSource.Agent.setUserId ("UserId");

        // Load Banner example
        LoadBanner();
        LoadInterstitial();
    }
Exemplo n.º 18
0
 public void init(string appKey)
 {
     getBridge().Call("setPluginData", "Unity", IronSource.pluginVersion(), IronSource.unityVersion());
     Debug.Log("IntegrationHelper pluginVersion: " + IronSource.pluginVersion());
     getBridge().Call("init", appKey);
 }
Exemplo n.º 19
0
 public void initISDemandOnly(string appKey, params string[] adUnits)
 {
     getBridge().Call("setPluginData", "Unity", IronSource.pluginVersion(), IronSource.unityVersion());
     Debug.Log("IntegrationHelper pluginVersion: " + IronSource.pluginVersion());
     getBridge().Call("initISDemandOnly", appKey, adUnits);
 }