示例#1
0
    void Start()
    {
        // For Test
        // AdManager.Initialize();

        // For Production
        AdConfig adConfig = new AdConfig();

        adConfig.SetApiKey(AdNetwork.Dclick, "test");
        adConfig.SetApiKey(AdNetwork.Google, "ca-app-pub-3940256099942544~3347511713");
        adConfig.SetUnitId(AdNetwork.Dclick, AdType.Banner, "test/test");
        adConfig.SetUnitId(AdNetwork.Google, AdType.Banner, "ca-app-pub-3940256099942544/6300978111");

        adConfig.SetUnitId(AdNetwork.Dclick, AdType.Interstitial, "test/test");
        adConfig.SetUnitId(AdNetwork.Google, AdType.Interstitial, "ca-app-pub-3940256099942544/1033173712");

        adConfig.SetUnitId(AdNetwork.Dclick, AdType.Rewarded, "test/test");
        adConfig.SetUnitId(AdNetwork.Google, AdType.Rewarded, "ca-app-pub-3940256099942544/5224354917");

        AdManager.Initialize(adConfig);

        // Load Ads
        this.LoadBannerAd();
        this.LoadInterstitialAd();
        this.LoadRewardedAd();
    }