Skip to main content
PlaytoliaEntitlements tracks what the player has permanently or temporarily unlocked through purchases. Entitlements are granted automatically when a purchase completes.

Checking entitlements

var all    = PlaytoliaEntitlements.GetAllEntitlements();
var single = PlaytoliaEntitlements.GetEntitlementByGrantId("vip_pass");
var list   = PlaytoliaEntitlements.GetEntitlementsByGrantId("vip_pass");
var byItem = PlaytoliaEntitlements.GetEntitlementByItemId(storeItemId);
GetEntitlementByGrantId and GetEntitlementByItemId only return valid, non-expired entitlements. A null result means the player doesn’t have a current entitlement — no need to check IsExpired yourself.

Checking access

var premium = PlaytoliaEntitlements.GetEntitlementByGrantId("premium_pass");
if (premium != null)
    EnablePremiumFeatures();

PlayerEntitlement fields

Id, GrantId, Amount, CreatedAt, ExpiresAt, StoreItem, IsExpired
If you use GetAllEntitlements() and filter manually, check IsExpired — the full list includes expired entitlements. The targeted getters do not.

Listening to changes

void Start()    => PlaytoliaEntitlements.AddListener(UpdateAccess);
void OnDestroy() => PlaytoliaEntitlements.RemoveListener(UpdateAccess);