Skip to main content
The Unity form of the Gifts Button trigger component. The native button floats above the Unity view at a rect your game sets, and takes its height from the look Encore serves. After a claim it usually turns into the reminder look, so its height changes: listen to HeightChanged, or use EncoreGiftsButtonView, which resizes its element. Tapping it opens the reward sheet.

Signature

GiftsButton is an EncoreTrigger with the trigger ID giftsButton built in. Placing it, its height, its live setters, its Result event, and Dispose() are on EncoreTrigger, and every option is on TriggerOptions. Create throws ArgumentException for a blank placement.

Example

EncoreGiftsButtonView

A MonoBehaviour, under Add Component → Encore → Gifts Button, that keeps the button over an empty RectTransform in your Canvas and follows it every frame as the layout moves or scales. It waits for Encore.Configure, then creates the button in its first LateUpdate after that.
Its Inspector fields, Placement, and Result are those of EncoreTriggerView, without triggerId.

Notes

  • After a claim, the button can turn into a Claim Reminder; see After a claim. It turns back after a later check of the claim confirms the completion (see After a completion), which can take a few minutes.
  • The rules every trigger component shares, such as drawing order, are in EncoreTrigger notes.