コード例 #1
0
    // Creates a banner of the given type placed based on the position parameter
    public static void createBanner( AdMobAndroidAd type, AdMobAdPlacement placement )
    {
        if( Application.platform != RuntimePlatform.Android )
            return;

        _admobPlugin.Call( "createBanner", (int)type, (int)placement );
    }
コード例 #2
0
    // Creates a banner of the given type placed based on the position parameter
    public static void createBanner(AdMobAndroidAd type, AdMobAdPlacement placement)
    {
        if (Application.platform != RuntimePlatform.Android)
        {
            return;
        }

        _admobPlugin.Call("createBanner", (int)type, (int)placement);
    }
コード例 #3
0
    // Creates a banner of the given type at the given position. This method requires an adUnitId and you must be updated to the new AdMob system.
    public static void createBanner(string adUnitId, AdMobAndroidAd type, AdMobAdPlacement placement)
    {
        if (Application.platform != RuntimePlatform.Android)
        {
            return;
        }

        createBanner(adUnitId, (int)type, (int)placement);
    }
コード例 #4
0
	public AdvertisementAdMob(string key_android, string inters_id): base(key_android, null)
	{	
		try
		{
			if (Info.IsEditor())
				return;
			
			#if UNITY_ANDROID
				this.inters_id = inters_id;
				
				placement = AdMobAdPlacement.BottomCenter;
			#endif
		}
		catch
		{
			Error(API, ERROR_STARTUP_CONSTRUCTOR);
		}
	}
コード例 #5
0
    public AdvertisementAdMob(string key_android, string inters_id) : base(key_android, null)
    {
        try
        {
            if (Info.IsEditor())
            {
                return;
            }

                        #if UNITY_ANDROID
            this.inters_id = inters_id;

            placement = AdMobAdPlacement.BottomCenter;
                        #endif
        }
        catch
        {
            Error(API, ERROR_STARTUP_CONSTRUCTOR);
        }
    }
コード例 #6
0
    public override void fetchBanner(AdvertisementManager.Positions pos)
    {
        try
        {
            base.fetchBanner(pos);

            if (Info.IsEditor() || (firstTime && !Setup()))
            {
                return;
            }

                        #if UNITY_ANDROID
            placement = (pos == AdvertisementManager.Positions.BOTTOM)
                                        ? AdMobAdPlacement.BottomCenter
                                        : AdMobAdPlacement.TopCenter;
                        #endif
        }
        catch
        {
            Error(API, ERROR_LOADING_BANNER);
        }
    }
コード例 #7
0
	public override void fetchBanner(AdvertisementManager.Positions pos)
	{
		try
		{
			base.fetchBanner(pos);
			
			if (Info.IsEditor() || (firstTime && !Setup()))
				return;
			
			#if UNITY_ANDROID
				placement = (pos == AdvertisementManager.Positions.BOTTOM)
					? AdMobAdPlacement.BottomCenter
					: AdMobAdPlacement.TopCenter;
			#endif
		}
		catch
		{
			Error(API, ERROR_LOADING_BANNER);
		}
	}
コード例 #8
0
 // Creates a banner of the given type at the given position. This method requires an adUnitId and you must be updated to the new AdMob system.
 public static void createBanner(string adUnitId, AdMobAndroidAd type, AdMobAdPlacement placement)
 {
     createBanner(adUnitId, (int)type, (int)placement);
 }
コード例 #9
0
 // Creates a banner of the given type at the given position. This method does not take an adUnitId and will work with legacy AdMob accounts.
 public static void createBanner(AdMobAndroidAd type, AdMobAdPlacement placement)
 {
     createBanner("", type, placement);
 }
コード例 #10
0
ファイル: AdMobAndroid.cs プロジェクト: NhamPhanDinh/testdua
 // Creates a banner of the given type at the given position. This method requires an adUnitId and you must be updated to the new AdMob system.
 public static void createBanner( string adUnitId, AdMobAndroidAd type, AdMobAdPlacement placement )
 {
     createBanner( adUnitId, (int)type, (int)placement );
 }
コード例 #11
0
ファイル: AdMobAndroid.cs プロジェクト: NhamPhanDinh/testdua
 // Creates a banner of the given type at the given position. This method does not take an adUnitId and will work with legacy AdMob accounts.
 public static void createBanner( AdMobAndroidAd type, AdMobAdPlacement placement )
 {
     createBanner( "", type, placement );
 }