2using GoogleMobileAds.Api;
16 [Tooltip(
"If enabled, the NativeOverlay ad will be hidden automatically when the parent script or GameObject is disabled.")]
20 [Tooltip(
"The position on the screen where the native overlay ad should be displayed.")]
24 [Tooltip(
"Options for the native ad.")]
27 AdChoicesPlacement = AdChoicesPlacement.TopRightCorner,
28 MediaAspectRatio = MediaAspectRatio.Any
31 [Tooltip(
"The background color for the ad's main area.")]
35 [Tooltip(
"Text style options for the ad template.")]
39 [Tooltip(
"The type of native template to be used for the ad.")]
43 [Tooltip(
"Indicates if the default ad size should be used.")]
49 [Tooltip(
"The size of the banner ad when not using the default size.")]
56 [Tooltip(
"Allows customization of the primary text in the ad.")]
62 [Tooltip(
"The style options for the primary text when customization is enabled.")]
66 [Tooltip(
"Allows customization of the secondary text in the ad.")]
72 [Tooltip(
"The style options for the secondary text when customization is enabled.")]
76 [Tooltip(
"Allows customization of the tertiary text in the ad.")]
82 [Tooltip(
"The style options for the tertiary text when customization is enabled.")]
99 nativeTemplateType
switch
101 NativeTemplateType.Small => NativeTemplateId.Small,
102 NativeTemplateType.Medium => NativeTemplateId.Medium,
103 _ =>
throw new ArgumentOutOfRangeException()
114 private Color backgroundColor = Color.green;
116 private Color textColor = Color.white;
118 private int fontSize = 9;
120 private NativeTemplateFontStyle style = NativeTemplateFontStyle.Bold;
129 if (styleOptions ==
null)
132 return new NativeTemplateTextStyle
134 BackgroundColor = styleOptions.backgroundColor,
135 TextColor = styleOptions.textColor,
136 FontSize = styleOptions.fontSize,
137 Style = styleOptions.style
147 [Tooltip(
"Represents a small-sized template for native ads.")]
149 [Tooltip(
"Represents a medium-sized template for native ads.")]
Represents a configurable banner size for ads, allowing for predefined or custom dimensions.
NativeTemplateTextStyleOptions PrimaryText
The style options for the primary text when customization is enabled.
bool DefaultAdSize
Indicates if the default ad size should be used.
NativeTemplateTextStyleOptions TemplateTextStyle
Text style options for the ad template.
string GetNativeTemplateId()
Retrieves the identifier of the native ad template based on the selected template type,...
bool CustomizablePrimaryText
Allows customization of the primary text in the ad.
NativeTemplateTextStyleOptions TertiaryText
The style options for the tertiary text when customization is enabled.
bool CustomizableTertiaryText
Allows customization of the tertiary text in the ad.
Color MainBackgroundColor
The background color for the ad's main area.
bool CustomizableSecondaryText
Allows customization of the secondary text in the ad.
AdPosition AdPosition
The position on the screen where the native overlay ad should be displayed.
NativeAdOptions NativeAdOptions
Options for the native ad.
BannerSize AdSize
The size of the banner ad when not using the default size.
NativeTemplateTextStyleOptions SecondaryText
The style options for the secondary text when customization is enabled.
bool HideOnDisable
Flag indicating whether the NativeOverlay ad should be hidden automatically when the script or GameOb...
Represents the configuration options for native overlay ads, including style, position,...
Represents the extended styling options for native ad text, including background color,...
NativeTemplateType
Represents the different template types available for rendering native ads, such as small and medium.