GoogleMobileAds.Api.AdSize

The size of a banner ad.

Summary

See also:https://developers.google.com/admob/unity/banner::banner_sizes Banner sizes.

Constructors and Destructors

AdSize(int width, int height)
Creates a new AdSize.

Public types

Type enum
The type of banner ad.

Public static attributes

Banner = new AdSize(320, 50)
readonly AdSize
Interactive Advertising Bureau (IAB) banner ad size (320x50 density-independent pixels).
FullWidth = -1
readonly int
IABBanner = new AdSize(468, 60)
readonly AdSize
Interactive Advertising Bureau (IAB) full banner ad size (468x60 density-independent pixels).
Leaderboard = new AdSize(728, 90)
readonly AdSize
Interactive Advertising Bureau (IAB) leaderboard ad size (728x90 density-independent pixels).
MediumRectangle = new AdSize(300, 250)
readonly AdSize
Interactive Advertising Bureau (IAB) medium rectangle ad size (300x250 density-independent pixels).
SmartBanner = new AdSize(0, 0, Type.SmartBanner)
readonly AdSize
A dynamically sized banner that is full-width and auto-height.

Properties

AdType
The type of banner ad.
Height
int
The height of the ad in density-independent pixels.
Width
int
The width of the ad in density-independent pixels.

Public functions

Equals(object obj)
override bool
GetHashCode()
override int

Public static functions

GetCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(int width)
GetLandscapeAnchoredAdaptiveBannerAdSizeWithWidth(int width)
GetPortraitAnchoredAdaptiveBannerAdSizeWithWidth(int width)
operator!=(AdSize a, AdSize b)
bool
operator==(AdSize a, AdSize b)
bool

Public types

Type

 Type

The type of banner ad.

Public static attributes

readonly AdSize Banner = new AdSize(320, 50)

Interactive Advertising Bureau (IAB) banner ad size (320x50 density-independent pixels).

FullWidth

readonly int FullWidth = -1

IABBanner

readonly AdSize IABBanner = new AdSize(468, 60)

Interactive Advertising Bureau (IAB) full banner ad size (468x60 density-independent pixels).

Leaderboard

readonly AdSize Leaderboard = new AdSize(728, 90)

Interactive Advertising Bureau (IAB) leaderboard ad size (728x90 density-independent pixels).

MediumRectangle

readonly AdSize MediumRectangle = new AdSize(300, 250)

Interactive Advertising Bureau (IAB) medium rectangle ad size (300x250 density-independent pixels).

SmartBanner

readonly AdSize SmartBanner = new AdSize(0, 0, Type.SmartBanner)

A dynamically sized banner that is full-width and auto-height.

Properties

AdType

Type AdType

The type of banner ad.

Height

int Height

The height of the ad in density-independent pixels.

Width

int Width

The width of the ad in density-independent pixels.

Public functions

AdSize

 AdSize(
  int width,
  int height
)

Creates a new AdSize.

Details
Parameters
width
The width of the ad in density-independent pixels.
height
The height of the ad in density-independent pixels.

Equals

override bool Equals(
  object obj
)

GetHashCode

override int GetHashCode()

Public static functions

GetCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth

AdSize GetCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(
  int width
)

GetLandscapeAnchoredAdaptiveBannerAdSizeWithWidth

AdSize GetLandscapeAnchoredAdaptiveBannerAdSizeWithWidth(
  int width
)

GetPortraitAnchoredAdaptiveBannerAdSizeWithWidth

AdSize GetPortraitAnchoredAdaptiveBannerAdSizeWithWidth(
  int width
)

operator!=

bool operator!=(
  AdSize a,
  AdSize b
)

operator==

bool operator==(
  AdSize a,
  AdSize b
)