> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encorekit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Placement()

> Build a placement for a moment in your game and present Encore's sheet.

Creates a placement builder. `ShowAsync()` presents Encore's sheet above your game and completes with a [`PresentationResult`](https://docs.encorekit.com/publishers/unity/sdk-reference/presentation-result).

## Signature

```csharp theme={null}
public static Placement Placement(string placementId)

public sealed class Placement
{
    public Placement UseCase(UseCase useCase);
    public Placement Headline(string headline);
    public Placement Subheadline(string subheadline);
    public Placement Cta(string cta);
    public Placement Decline(string decline);
    public Placement Badge(string badge);
    public Placement Appearance(AppearanceConfig appearance);
    public event Action<bool> OnLoadingStateChange;
    public void Prefetch();
    public Task<bool> HasOffersAsync();
    public void HasOffers(Action<bool> onResult);
    public Task<PresentationResult> ShowAsync();
    public void Show(Action<PresentationResult> onResult);
}

public enum UseCase { RewardUsers, ReduceChurn }
```

Each step sets a value on the same builder and returns it.

## Parameters

| Name | Type | Platforms | Description |
| - | - | - | - |
| `placementId` | `string` | All | Names the moment, such as `level_complete`. Results and analytics carry it |
| `UseCase` | `UseCase` | All | `RewardUsers` for a moment the player earned, or `ReduceChurn` for a paywall decline. `ReduceChurn` is the default, so a reward placement must set `RewardUsers`. Offers that sell a product need an [`IEncorePurchaseController`](https://docs.encorekit.com/publishers/unity/sdk-reference/purchase-controller) in `Configure` |
| `Headline`, `Subheadline` | `string` | All | Your copy for this presentation. Null or empty falls back to the copy Encore resolved for your app |
| `Cta` | `string` | Android, iOS | The primary button's label. Read by the reward use case only. An empty string keeps the served copy |
| `Decline` | `string` | Android, iOS | The decline button's label, with the same rules as `Cta` |
| `Badge` | `string` | Android, iOS | The badge on the highlighted offer, with the same rules as `Cta` |
| `Appearance` | [`AppearanceConfig`](https://docs.encorekit.com/publishers/unity/sdk-reference/appearance-config) | Android, iOS, WebGL | Your colors for this sheet. The sheet reads `AccentColor`, `BackgroundColor`, and `TextColor` (`TextColor` only together with `BackgroundColor`) |
| `OnLoadingStateChange` | `event Action<bool>` | All | `true` when `Show` starts and `false` when its result arrives, before the result callback. Raised on the main thread |
| `Prefetch()` | | iOS | Warms this placement's offers so `Show` opens without a network round trip. Call it when the screen comes into view. Elsewhere it does nothing |
| `HasOffersAsync()`, `HasOffers()` | `Task<bool>`, `Action<bool>` | All | Whether `Show` would find offers for this player now. See [Show your entry only when it opens something](#show-your-entry-only-when-it-opens-something) |

## Example

```csharp theme={null}
var reward = Encore.Placement("level_complete").UseCase(UseCase.RewardUsers);
reward.Prefetch(); // when the level-complete screen opens

reward.OnLoadingStateChange += loading => spinner.SetActive(loading);
var result = await reward
    .Headline("Level 3 cleared!")
    .Cta("Claim my gift")
    .Decline("Maybe later")
    .ShowAsync();
```

## Show your entry only when it opens something

`HasOffersAsync()` asks whether `Show` would find offers for this player now, so a button you draw yourself can stay hidden when no offer fits:

```csharp theme={null}
var reward = Encore.Placement("level_complete").UseCase(UseCase.RewardUsers);
giftButton.SetActive(await reward.HasOffersAsync());
```

It answers `false` for `ReduceChurn`, so set `RewardUsers` first. It also answers `false` before [`Configure()`](https://docs.encorekit.com/publishers/unity/sdk-reference/configure), in the Unity Editor, and on any failure. `HasOffers(onResult)` gives the same answer through a callback.

## Notes

* The last call to each setter wins.
* Subscribe to `OnLoadingStateChange` before you call `Show` or `ShowAsync`: each call reads the handlers it has then.
* `ShowAsync()` never throws: every outcome, including "nothing was presented", is a value on the result. `Show()` throws `ArgumentNullException` only when `onResult` is null.
* The result arrives on the Unity main thread, and so does the `HasOffers` answer.
* The reward use case, the copy rules, and the gotchas are in [Reward placements](https://docs.encorekit.com/publishers/guides/reward-placements.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.