Google Play Instant Plugin for Unity Beta (Archived)
The code for this project has been migrated to the Google Play Plugins for Unity project, and this GitHub project is now archived.
Refer to the developer documentation for the latest information about the Google Play Instant Plugin for Unity.
Some of the files in this archived GitHub project have the same Guid as files in
the new GitHub project. This allows projects that are using Play assets, such as
LoadingScreen MonoBehaviour, to still work after migrating.
The new Google Play Plugins for Unity project uses the namespace
Google.Play.Instant instead of
GooglePlayInstant, so any
using GooglePlayInstant; statements will have to be updated.
The new Google Play Plugins for Unity no longer supports the ability to set a custom instant apps URL.
Familiarize yourself with the download and import process for the new plugin, and either download the new
.unitypackagefile or set up the Game Package Registry for Unity.
Delete the existing
Assets/GooglePlayInstantdirectory (if you previously imported from a
.unitypackagefile) or the
Assets/play-instant-unity-plugindirectory (if you previously imported via
git clone). Note that at this point there may be errors such as "error CS0103: The name `InstallLauncher' does not exist in the current context" in the project.
.unitypackageobtained from the first step or install the Google Play Instant package in Unity Package Manager.
using GooglePlayInstant;statements to
Launching an instant app from the Play Store redirects to the browser
This issue occurs when launching an instant app if the following is true:
- Your currently released instant app is launchable via a custom URL.
- You have uploaded a version of your instant app that does not specify a custom URL to alpha or internal test.
- You are trying to launch this non-production version of your instant app.
The latest plugin no longer supports the ability to set a custom instant apps URL. If your app previously included a custom instant apps URL, uploading an app built with the latest plugin could trigger this issue.
There are two workarounds:
- The issue will not occur for an instant app in production, so release the app to production to eliminate the issue.
- If you'd prefer to fix the issue in alpha, add the browsable intent filter and default url tags to the UnityPlayerActivity in your app's manifest:
<intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="http" android:host="<url-host>" android:pathPrefix="<url-path-prefix>" /> <data android:scheme="https" android:host="<url-host>" android:pathPrefix="<url-path-prefix>" /> </intent-filter> <meta-data android:name="default-url" android:value="<the-default-url-of-your-released-app>" />