Stay organized with collections
Save and categorize content based on your preferences.
GoogleMobileAds.Api.NativeAdOptions
Ad options for configuring the view of native ads.
Summary
Public attributes
AdChoicesPlacement
AdChoicesPlacement AdChoicesPlacement
Sets the placement of AdChoices icon (if present).
Default is TopRightCorner.
MediaAspectRatio MediaAspectRatio
Image and video aspect ratios.
Default is Unknown.
Public functions
NativeAdOptions
NativeAdOptions()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eNativeAdOptions\u003c/code\u003e configures the display settings for native ads within the Google Mobile Ads SDK.\u003c/p\u003e\n"],["\u003cp\u003eYou can create a \u003ccode\u003eNativeAdOptions\u003c/code\u003e object using the default constructor or by copying an existing \u003ccode\u003eNativeAdOptions\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAdChoicesPlacement\u003c/code\u003e attribute allows you to set the position of the AdChoices icon, defaulting to the top right corner.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMediaAspectRatio\u003c/code\u003e determines the aspect ratio of images and videos in native ads and defaults to an unknown ratio.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eVideoOptions\u003c/code\u003e enables the setting of a \u003ccode\u003eVideoOptions\u003c/code\u003e object to control video playback in native ads.\u003c/p\u003e\n"]]],["`NativeAdOptions` configures native ad views, offering control over presentation. Key actions include creating `NativeAdOptions` objects, either default or new. Attributes manage ad display aspects: `AdChoicesPlacement` sets the AdChoices icon's position, with a default of TopRightCorner; `MediaAspectRatio` defines image and video ratios, defaulting to Unknown; and `VideoOptions` handles video playback. These elements enable customization of how native ads are rendered.\n"],null,["# GoogleMobileAds.Api.NativeAdOptions Class Reference\n\nGoogleMobileAds.Api.NativeAdOptions\n===================================\n\nAd options for configuring the view of native ads.\n\nSummary\n-------\n\n| ### Constructors and Destructors ||\n|---|---|\n| [NativeAdOptions](#class_google_mobile_ads_1_1_api_1_1_native_ad_options_1a7b554c2605bfdc9eff7eb33aaaa4dbd4)`()` Create a new default [NativeAdOptions](/ad-manager/mobile-ads-sdk/unity/reference/class/google-mobile-ads/api/native-ad-options#class_google_mobile_ads_1_1_api_1_1_native_ad_options) object. ||\n| [NativeAdOptions](#class_google_mobile_ads_1_1_api_1_1_native_ad_options_1a430048957b6dad9c18a00a75681e10c4)`(`[NativeAdOptions](/ad-manager/mobile-ads-sdk/unity/reference/class/google-mobile-ads/api/native-ad-options#class_google_mobile_ads_1_1_api_1_1_native_ad_options)` options)` Create a new [NativeAdOptions](/ad-manager/mobile-ads-sdk/unity/reference/class/google-mobile-ads/api/native-ad-options#class_google_mobile_ads_1_1_api_1_1_native_ad_options) object. ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [AdChoicesPlacement](#class_google_mobile_ads_1_1_api_1_1_native_ad_options_1a8144621cbe7d6ddb4892f80acd252cc0) | [AdChoicesPlacement](/ad-manager/mobile-ads-sdk/unity/reference/namespace/google-mobile-ads/api#namespace_google_mobile_ads_1_1_api_1a6691727ad634c31951a28ca525543edd) Sets the placement of AdChoices icon (if present). |\n| [MediaAspectRatio](#class_google_mobile_ads_1_1_api_1_1_native_ad_options_1abdb0866650701cce12ced1dac2e50cc5) | [MediaAspectRatio](/ad-manager/mobile-ads-sdk/unity/reference/namespace/google-mobile-ads/api#namespace_google_mobile_ads_1_1_api_1a430a6bafb454899bd45345f83025174c) Image and video aspect ratios. |\n| [VideoOptions](#class_google_mobile_ads_1_1_api_1_1_native_ad_options_1ad15658343ae93d46145a76c52486e2c6) | [VideoOptions](/ad-manager/mobile-ads-sdk/unity/reference/class/google-mobile-ads/api/video-options#class_google_mobile_ads_1_1_api_1_1_video_options) Sets the [VideoOptions](/ad-manager/mobile-ads-sdk/unity/reference/class/google-mobile-ads/api/video-options#class_google_mobile_ads_1_1_api_1_1_video_options) object. |\n\nPublic attributes\n-----------------\n\n### AdChoicesPlacement\n\n```c#\nAdChoicesPlacement AdChoicesPlacement\n``` \nSets the placement of AdChoices icon (if present).\n\nDefault is TopRightCorner. \n\n### MediaAspectRatio\n\n```c#\nMediaAspectRatio MediaAspectRatio\n``` \nImage and video aspect ratios.\n\nDefault is Unknown. \n\n### VideoOptions\n\n```c#\nVideoOptions VideoOptions\n``` \nSets the [VideoOptions](/ad-manager/mobile-ads-sdk/unity/reference/class/google-mobile-ads/api/video-options#class_google_mobile_ads_1_1_api_1_1_video_options) object.\n\nPublic functions\n----------------\n\n### NativeAdOptions\n\n```c#\n NativeAdOptions()\n``` \nCreate a new default [NativeAdOptions](/ad-manager/mobile-ads-sdk/unity/reference/class/google-mobile-ads/api/native-ad-options#class_google_mobile_ads_1_1_api_1_1_native_ad_options) object. \n\n### NativeAdOptions\n\n```c#\n NativeAdOptions(\n NativeAdOptions options\n)\n``` \nCreate a new [NativeAdOptions](/ad-manager/mobile-ads-sdk/unity/reference/class/google-mobile-ads/api/native-ad-options#class_google_mobile_ads_1_1_api_1_1_native_ad_options) object."]]