Purchasely
4.4
4.4
  • Welcome page
  • General
    • Presentation
    • Release notes
  • Quick start
    • Console Configuration
    • SDK Implementation
    • Testing
    • Sample
  • Basic configuration
    • Console Configuration
      • Creating a new application
      • Creating your Products
        • App Store
        • Play Store
        • Huawei App Gallery
        • Amazon App Store
        • Products & Plans
      • Design your Paywalls
      • Design your Paywalls-Latest
        • Carousel
        • Carousel Flow
        • Features List
        • Features List & Plan Picker with 2 & 3 columns
        • Feature list overlay
        • Plan picker horizontal
        • Plan picker with 2 and 3 Column
    • SDK installation
      • iOS SDK
      • Android SDK
      • React Native SDK
      • Cordova SDK
      • Flutter SDK
      • Unity SDK
    • SDK configurations
      • Paywall observer mode
      • Full mode
      • StoreKit 2
      • Appendices
        • Start the SDK
        • Set User Id
        • Notify when the app is ready
        • Present paywalls
        • Unlock content / service
        • Close SDK (Android only)
    • Stripe
    • Purchasely with RevenueCat
  • S2S notifications
    • Server-to-server notifications ?
    • Apple App Store
    • Google Play Store
    • Huawei App Gallery
  • Analytics
    • Dashboards
      • Introduction
      • Live
      • Subscriptions
      • Cohorts
      • Trials
      • Events
    • Events
      • Webhook events
        • Subscription events
        • Subscription events attributes
      • SDK events
        • UI events
        • UI attributes
  • Integrations
    • Webhook
      • Receiving and understanding messages
      • Managing entitlements
      • Detailed sequence diagrams
    • Airship
    • Amplitude
    • AppsFlyer
    • Adjust
    • Piano analytics(ex AT Internet)
    • Batch
    • Branch
    • Braze
    • Clevertap
    • Customer.io
    • Firebase
    • Iterable
    • Mixpanel
    • MoEngage
    • OneSignal
    • Segment
    • Brevo(ex Sendinblue)
  • Advanced Features
    • Asynchronous paywalls
    • NEW: Promotional offers
    • Anonymous user
    • Associating content
    • Audiences
    • Customising UI
      • Errors & alerts
      • Controllers (iOS) / Fragments (Android)
    • Deeplinks automations
    • Disable placements
    • Displaying users subscriptions
    • Localization
    • Lottie animations
    • Non-subscription products
    • Paywall action interceptor
    • Promoting your products
      • Self-promotion
      • Promoting In-App Purchases
    • Purchase manually
    • Subscription status
    • Use your own paywall
  • Others
    • Frequently Asked Questions
    • Migration guides
      • Migrate to Purchasely
      • Webhook
        • Migrate to Webhook v3.0
      • SDK
        • Migrate to SDK v3.0
          • v2.2.0
          • v2.1.3
        • Migrate to SDK v3.1
        • Migrate to SDK v3.2
        • Migrate to SDK v4.0.0
  • TESTING
    • Testing Cycle Durations
Powered by GitBook

© Purchasely 2020-2023

On this page
  • Installation
  • Unity Package Manager
  • API Key
  • External Dependencies Manager
  • Troubleshoot

Was this helpful?

Edit on GitHub
  1. Basic configuration
  2. SDK installation

Unity SDK

Guide for integrating Purchasely SDK inside your Unity application

PreviousFlutter SDKNextSDK configurations

Last updated 1 year ago

Was this helpful?

Installation

Unity Package Manager

From the Unity Package Manager window:

  • Add Package from Git url

https://github.com/Purchasely/Unity-Package.git

API Key

From the Purchasely package window (Windows -> Purchasely):

  • Set the API Key field to your Purchasely API Key

External Dependencies Manager

A third party external package is necessary to handle external dependencies with Cocoapods for iOS and Gradle for Android

  • Got to Assets → Import package → Custom package

  • Find and add external-dependency-manager-latest.unitypackage from

You can also use to install it

Troubleshoot

Resolve on build or automatically

In Assets -> External Dependency Manager -> Android Resolver > Settings make sure that Resolution On Build and/or Auto Resolution are checked as well as patch gradleTemplate.properties

Add custom gradle files

To allow dependency manager to work properly, it may be required to add custom gradle files to your project. You can do that in a few clicks

File -> Build Settings -> Android -> Player Settings -> Publishing Settings

You need to check

  • Custom Gradle Properties Template

If it is still not working, we suggest to check also the following

  • Custom Main Gradle Template

  • Custom Base Gradle Template

Remove included AAR or APK

If you have a duplicate class issue, it may be due to AAR or APK included directly in your Project. Unity may add them directly, you can look in Project window and Assets -> Plugin -> Android If you have some aar files, mainly the ones starting with androidx, included there, you should remove them as Purchasely already integrate them and they are the ones causing this conflict error

Clean Build

After including or updating Purchasely Unity Package, you should do a Clean Build in File -> Build Settings -> Android to make sure that the latest Purchasely android dependencies are fetched by your project

If you have difficulties building your Unity project with Purchasely Package, please make sure to follow all those steps and is installed on your project

https://github.com/googlesamples/unity-jar-resolver
Unity Package Manager
External Dependency Manager