Class LevelPlayAdSize
Represents dimensions and descriptions for different types of advertisement sizes.
Inherited Members
Namespace: com.unity3d.mediation
Assembly: Unity.LevelPlay.dll
Syntax
public class LevelPlayAdSize
Fields
BANNER
Standard banner size
Declaration
public static LevelPlayAdSize BANNER
Field Value
Type | Description |
---|---|
Level |
LARGE
Standard large size
Declaration
public static LevelPlayAdSize LARGE
Field Value
Type | Description |
---|---|
Level |
LEADERBOARD
Standard leaderboard size
Declaration
public static LevelPlayAdSize LEADERBOARD
Field Value
Type | Description |
---|---|
Level |
MEDIUM_RECTANGLE
Standard mrec size
Declaration
public static LevelPlayAdSize MEDIUM_RECTANGLE
Field Value
Type | Description |
---|---|
Level |
Properties
CustomWidth
Custom width of the banner in DP
Declaration
public int CustomWidth { get; }
Property Value
Type | Description |
---|---|
int |
Description
Description for the banner
Declaration
public string Description { get; }
Property Value
Type | Description |
---|---|
string |
Height
Height of the banner
Declaration
public int Height { get; }
Property Value
Type | Description |
---|---|
int |
Width
Width of the banner
Declaration
public int Width { get; }
Property Value
Type | Description |
---|---|
int |
Methods
CreateAdaptiveAdSize(int)
Creates an adaptive banner with default screen width. The default screen width is used if the custom width is not specified. Specify the custom width if necessary.
Declaration
public static LevelPlayAdSize CreateAdaptiveAdSize(int customWidth = -1)
Parameters
Type | Name | Description |
---|---|---|
int | customWidth | Custom width of the adaptive banner container. On Android, it is measured in DP(density-independent pixels), and on IOS, it is in measured in Points. |
Returns
Type | Description |
---|---|
Level |
A new instance of Level |
CreateCustomBannerSize(int, int)
Creates a custom banner size with specified dimensions.
Declaration
public static LevelPlayAdSize CreateCustomBannerSize(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
int | width | The width of the custom banner in pixels. |
int | height | The height of the custom banner in pixels. |
Returns
Type | Description |
---|---|
Level |
A new instance of Level |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |