Repository navigation
Releases: EncoreKit/unity-sdk
Releases · EncoreKit/unity-sdk
Release list
v2.5.0
Added
- Post-action reward placements:
Encore.Placement(...).UseCase(UseCase.RewardUsers).ShowAsync()on Android, iOS and WebGL. - The gift button (
EncoreGiftsButtonView), which shows the served gift button trigger variant on Android, iOS and WebGL. - Native pins:
com.encorekit:encore2.5.0, theEncoreKit2.5.0 pod, and@encorekit/web-sdk2.5.0 for WebGL.
The pod resolves from theEncoreKit/cocoapods-specsspec repo, because CocoaPods trunk takes no new versions from
2 December 2026; the game's other pods still resolve from trunk. A Podfile that External Dependency Manager writes
needs no change. A game that writes its own Podfile adds:source => 'https://github.com/EncoreKit/cocoapods-specs.git'to
itsEncoreKitline. - The Game Harness sample.
- The claim reminder (
ClaimReminder,EncoreClaimReminderView), a banner for an offer the user claimed and has not finished, and any native trigger by id (EncoreTrigger,EncoreTriggerView). They share the gift button's host, so each has the same frame, visibility, height, live updates andDispose. Android, iOS and WebGL.GiftsButtonandEncoreGiftsButtonVieware unchanged for a game. - Setters that served looks read:
Placement.AppearanceandPlacement.PublisherReward, and on the gift buttonIcon,Alignment,AppearanceandPublisherReward, withSetAlignment,SetAppearanceandSetPublisherRewardfor a live button. Android, iOS and WebGL; on WebGL the web SDK 2.5.0 takes the prize but does not draw or grant it, soUserConfirmedCompletionstays false there. On WebGL,SetValues,SetAppearanceandSetPublisherRewardmount the gift button again. - Copy setters
Placement.Cta,DeclineandBadge, with the native rules: an empty string keeps the served copy, and only the reward use case reads them. Android and iOS; WebGL ignores them, because the web SDK 2.5.0 placement builder has nocta,declineorbadge. Encore.IsClaimEnabled(Android and iOS apply a change to an open sheet; WebGL from the nextShow) andEncore.PublisherRewardPolicy, the reward daily limit, clamped to 1 to 10 (Android and iOS; WebGL keeps the server default). Both can be set beforeConfigure, which sends them, and both surviveReset.Placement.Prefetch(), which warms the offers soShowopens without a network round trip. iOS only: Android SDK 2.5.0 and web SDK 2.5.0 have no placement prefetch, so there it does nothing.Placement.OnLoadingStateChange, a C# event:truewhenShowstarts andfalsewhen its result arrives, before the result callback, on the main thread, on every platform (Android SDK 2.5.0 has no loading callback, so C# raises it everywhere, as the Swift and web builders do).- The purchase controller:
IEncorePurchaseController, passed toEncore.Configure, buys the product an offer sells
and answersPurchaseResult.Purchased,CancelledorPending. A throw is a failed purchase. Android and iOS. - Android: the offer sheet draws in the game's own window, so Unity keeps running under it and a purchase the sheet
asks for runs while it is open. The package's manifest setscom.encorekit.offerSheetInHostWindow; a game turns it
off withandroid:value="false"andtools:replace="android:value", and then Unity pauses under the sheet again.
A game that stops its timers or audio inOnApplicationPausemust do so itself while a sheet is open, for example
fromPlacement.OnLoadingStateChangeand the result callback. Placement.HasOffers(Action<bool>)andHasOffersAsync(): whetherShowwould find offers for this user now, for a
button or entry point you show only when it opens something. SelectUseCase.RewardUsers:ReduceChurnanswers
false, as the native SDKs do. Android, iOS and WebGL.- The package names itself to the native SDK (
unityand its version) beforeConfigure, so Encore can tell Unity
traffic apart in analytics and error reports. Each failure the package contains also goes to the SDK's error
reports, with the call name and the exception type only, never a message. Android, iOS and WebGL. UseCase.ReduceChurn, the paywall decline use case, on Android, iOS and WebGL. A placement with noUseCasecall
isReduceChurn, as in Swift and Android, so a reward placement must callUseCase(UseCase.RewardUsers). The gift
button stays reward only.Encore.Configure(apiKey, purchaseController, options)andConfigure(apiKey, options). A secondConfigureis now
ignored, as the native SDKs ignore it.EncoreOptionswithUnlock(UnlockMode.OptimisticorStrict) andTransactionLinking. WebGL readsLogLevelandUnlock.PlacementOutcome.Kind:StrictUnlockVerifiedoutcomes now reachEncore.Outcomes, withTransactionId. Android,
iOS and WebGL.- Entitlements:
Encore.IsActive,IsActiveAsync,IsActivePublisherandRevokeEntitlements. iOS only for
IsActiveandIsActivePublisher(they answerfalseon Android and WebGL; iOS 2.5.0 matches the type only, and its
Verifiedscope also counts provisional grants);RevokeEntitlementson iOS and WebGL. - Android only:
Encore.LinkPurchase,CurrentEntitlementandClearOfferCache. No-ops elsewhere.
Fixed
- WebGL: a sheet that opens while the game is fullscreen no longer stays hidden behind it. The web SDK draws its sheet on the page, so the package leaves fullscreen as the sheet opens, and again if the game enters fullscreen while it is open. A fullscreen root that holds the page keeps fullscreen. The gift button and other triggers stay visible in fullscreen.
- iOS: a bad message from C# or a missing window can no longer crash the game. A payload with NaN, a NaN frame, a
null callback and unreadable JSON are dropped, and a trigger with no root view reports height 0. A throw in a C#
callback is contained, not passed into native code. Every callback reaches C# on the main thread, and a purchase the
SDK ends at 300 s no longer stays open in the bridge. - Android: every bridge entry point contains a throw, bad JSON and a null argument, so none reaches C# or the main
looper, and calls stay in order on the main thread. A purchase request that cannot reach C# fails at once, not at
the SDK's 300 s ceiling. - WebGL: a throw from the web SDK or the Unity callback no longer breaks the game loop. A placement or revoke request
gets exactly one reply, and a destroyed or replaced gift button sends nothing more. Configure,Identifyand every other call no longer throw when the native layer throws. AConfigurethat threw
leavesEncore.IsConfiguredfalse, so it can run again.Showand the entitlement calls answer exactly once, one
game handler that throws no longer stops the others, and a gift button frame with a NaN or an infinity is not sent.- At the default
LogLevel.Nonethe SDK and its bridges log nothing of their own. So the "Already
configured" and "created before Encore.Configure" messages, which every game saw, now show only fromLogLevel.Warn. Contained failures log from
LogLevel.Warnup (iOS subsystemcom.encorekit.unity, Android tagEncoreUnity, the browser console on WebGL).