# GoogleMobileAds.Api.PictureInPictureAd

A Picture-in-Picture (PiP) ad that displays in a floating window across screens.

## Summary

| ### Events ||
|---|---|
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/picture-in-picture-ad#class_google_mobile_ads_1_1_api_1_1_picture_in_picture_ad_1a1f0e16508f3ff7e4a86bb9dce3365103` | `Action` Raised when an ad is clicked. |
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/picture-in-picture-ad#class_google_mobile_ads_1_1_api_1_1_picture_in_picture_ad_1a40a5c333d6c836c94c6d08663779f862` | `Action` Raised when the ad closed full-screen content. |
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/picture-in-picture-ad#class_google_mobile_ads_1_1_api_1_1_picture_in_picture_ad_1a3378ef6fba5aec39940594db44af7055` | `Action< https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/ad-error#class_google_mobile_ads_1_1_api_1_1_ad_error >` Raised when the ad failed to open full-screen content. |
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/picture-in-picture-ad#class_google_mobile_ads_1_1_api_1_1_picture_in_picture_ad_1a33f686137b0d0b336cdb0258b0816e19` | `Action` Raised when an ad opened full-screen content. |
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/picture-in-picture-ad#class_google_mobile_ads_1_1_api_1_1_picture_in_picture_ad_1a0d4a84e452cc6d1180021427bb271cbf` | `Action` Raised when the PiP ad is hidden from the screen. |
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/picture-in-picture-ad#class_google_mobile_ads_1_1_api_1_1_picture_in_picture_ad_1a820b564e2b6fd485b7a52dc7111a6f39` | `Action` Raised when an impression is recorded for an ad. |
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/picture-in-picture-ad#class_google_mobile_ads_1_1_api_1_1_picture_in_picture_ad_1a5080532ce79fc318742400b24104230d` | `Action< https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/ad-value#class_google_mobile_ads_1_1_api_1_1_ad_value >` Raised when the ad is estimated to have earned money. |
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/picture-in-picture-ad#class_google_mobile_ads_1_1_api_1_1_picture_in_picture_ad_1a5a7c5bd104b4499df8d9f7182e287af5` | `Action` Raised when the PiP ad is displayed on the screen. |

| ### Public static functions ||
|---|---|
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/picture-in-picture-ad#class_google_mobile_ads_1_1_api_1_1_picture_in_picture_ad_1ab32ba637a75d0be1aebffcf1463163cd(string adUnitId, https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/ad-request#class_google_mobile_ads_1_1_api_1_1_ad_request request, Action< https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/picture-in-picture-ad#class_google_mobile_ads_1_1_api_1_1_picture_in_picture_ad, https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/load-ad-error#class_google_mobile_ads_1_1_api_1_1_load_ad_error > adLoadCallback)` | `void` Loads a Picture-in-Picture ad. |

| ### Public functions ||
|---|---|
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/picture-in-picture-ad#class_google_mobile_ads_1_1_api_1_1_picture_in_picture_ad_1af57e670fbd4173bc95cbcaadbe725aab()` | `void` Destroys the Picture-in-Picture ad and cleans up native resources. |
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/picture-in-picture-ad#class_google_mobile_ads_1_1_api_1_1_picture_in_picture_ad_1a190fbd209aa5bcff84c5b49c8176596d()` | `https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/api#namespace_google_mobile_ads_1_1_api_1a457961a58784c5861e3a15b24f61014d` Returns the current or last known position of the Picture-in-Picture ad. |
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/picture-in-picture-ad#class_google_mobile_ads_1_1_api_1_1_picture_in_picture_ad_1ac1a542cd86c65d34c728673e815fe46a()` | `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/response-info#class_google_mobile_ads_1_1_api_1_1_response_info` Returns the [ResponseInfo](https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/response-info#class_google_mobile_ads_1_1_api_1_1_response_info) for the loaded ad, or null if unavailable. |
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/picture-in-picture-ad#class_google_mobile_ads_1_1_api_1_1_picture_in_picture_ad_1ad0613bc27bbca4070922cc37760c3ad9()` | `void` Hides the Picture-in-Picture ad from the screen. |
| `https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/picture-in-picture-ad#class_google_mobile_ads_1_1_api_1_1_picture_in_picture_ad_1aee9802396a77cf4e8ef933fb92ebf47b(https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/api#namespace_google_mobile_ads_1_1_api_1a457961a58784c5861e3a15b24f61014d position)` | `void` Shows the Picture-in-Picture ad on the screen at the specified corner position. |

## Events

### OnAdClicked

```c#
Action OnAdClicked
```
Raised when an ad is clicked.

### OnAdFullScreenContentClosed

```c#
Action OnAdFullScreenContentClosed
```
Raised when the ad closed full-screen content.

### OnAdFullScreenContentFailed

```c#
Action< AdError > OnAdFullScreenContentFailed
```
Raised when the ad failed to open full-screen content.

### OnAdFullScreenContentOpened

```c#
Action OnAdFullScreenContentOpened
```
Raised when an ad opened full-screen content.

### OnAdHidden

```c#
Action OnAdHidden
```
Raised when the PiP ad is hidden from the screen.

### OnAdImpressionRecorded

```c#
Action OnAdImpressionRecorded
```
Raised when an impression is recorded for an ad.

### OnAdPaid

```c#
Action< AdValue > OnAdPaid
```
Raised when the ad is estimated to have earned money.

### OnAdShown

```c#
Action OnAdShown
```
Raised when the PiP ad is displayed on the screen.

## Public static functions

### Load

```c#
void Load(
  string adUnitId,
  AdRequest request,
  Action< PictureInPictureAd, LoadAdError > adLoadCallback
)
```
Loads a Picture-in-Picture ad.

## Public functions

### Destroy

```c#
void Destroy()
```
Destroys the Picture-in-Picture ad and cleans up native resources.

### GetAdPosition

```c#
PictureInPictureAdPosition GetAdPosition()
```
Returns the current or last known position of the Picture-in-Picture ad.

### GetResponseInfo

```c#
ResponseInfo GetResponseInfo()
```
Returns the [ResponseInfo](https://developers.google.com/admob/unity/reference/class/google-mobile-ads/api/response-info#class_google_mobile_ads_1_1_api_1_1_response_info) for the loaded ad, or null if unavailable.

### Hide

```c#
void Hide()
```
Hides the Picture-in-Picture ad from the screen.

### Show

```c#
void Show(
  PictureInPictureAdPosition position
)
```
Shows the Picture-in-Picture ad on the screen at the specified corner position.