Add a Plugin to Your Unity Project
To add a Unity package to your project, follow these steps:
- In your Unity development environment, open the Project tab.
- In the left pane of the Project tab, right click the Assets folder, then select Import Package → Custom Package… in the context menu. An Import package… window opens.
- In the Import package… window, navigate to the folder containing the file with the .unity package extension that represents the plugin you wish to import.
- Select the .unitypackage file, and click Open. An Importing package window opens.
- In the Importing package window, review the list of files to be imported and check for conflicts with files already in your project. If a conflict exists, save any local changes somewhere outside of your project.
- Click Import. The package's files are added to the Assets folder.
- If you saved any local changes outside of your project, use your favorite file merging software to merge the differences between the file(s) you imported and the file(s) you saved.
Setup for In-App Purchasing
If you use Amazon's In-App Purchasing API (available in the Appstore SDK Unity plugin - or the older IAP v2.0 Unity plugin), you must update your manifest to declare the IAP response receiver before creating your Android APK. A sample Android Manifest is included with the IAP response receiver in
If you already have an Android manifest you can add the following under your application XML node:
<receiver android:name = "com.amazon.device.iap.ResponseReceiver" android:permission = "com.amazon.inapp.purchasing.Permission.NOTIFY" > <intent-filter> <action android:name = "com.amazon.inapp.purchasing.NOTIFY" /> </intent-filter> </receiver>
If you don't already have an Android Manifest, you can rename IapSdkCptServiceSampleAndroidManifest.xml to AndroidManifest.xml. You should update the
android:versionCode attributes of the manifest node.
Last updated: Jan 15, 2022