EncoreTrigger is a trigger view the SDK draws above the Unity view, at a screen rect your game sets. GiftsButton and ClaimReminder derive from it, so the members on this page are theirs too.
Signature
Icon, Alignment, and Appearance mean what they mean on every platform: see Icon, Width and alignment, and Colors. The types are AppearanceConfig and PresentationResult.
Members
TriggerOptions.UseCase defaults to RewardUsers, the use case trigger components support.
Example
EncoreTriggerView
AMonoBehaviour, under Add Component → Encore → Trigger, that keeps the trigger with the ID you give 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 trigger in its first LateUpdate after that. EncoreGiftsButtonView and EncoreClaimReminderView work the same way, with the ID built in.
Leave the element empty: the native trigger draws over it. Disabling the view hides the trigger, enabling it shows the trigger again, and destroying it removes the trigger. A blank ID or placement in the Inspector logs one error and disables the view.
Notes
- The trigger draws above all Unity content. Hide it with
SetVisible(false)while your game shows its own modal or pause screen. - On iOS, trigger components draw only on iOS 17 or later. Below that the height stays 0.
- In the Unity Editor the trigger reports a height of 0 and draws nothing.
- On WebGL,
SetValuesandSetAppearancemount the trigger again instead of redrawing it in place.