Detect subscription state Unity IAP

I want to get the subscription state in my Unity3D project (I'm using Unity IAP), so if the subscription has ended or cancelled I could just remove the exclusive subscription rewards. I made this pseudocode so you can have an idea of it:

if (Subscription.HasEnded || Subscription.IsCancelled)
{
RemoveRewards();
}

Upvotes: 1

Views: 2378

Answers (1)

Steven Coull
Steven Coull

Reputation: 478

You can check the state of the subscription through the Subscription Manager class.

Upvotes: 1

Related Questions