To run and test this project locally, you'll need to change the package name/bundle identifier of the Unity project.
Go to your AppsFlyer account and create an iOS or Android app(or both). Learn more here.
- Change the
Dev Key
to your key. - If you are using an iOS app, add the
App ID
. Else, do not change it.
- Create a OneLink template. Learn more here.
- Create a new OneLink custom link.
- In the new link:
- Set the
deep link value
to your desired start level(use1
for the first level or2
for the second level). - Under the Additional Parameters section, add a custom parameter name
deep_link_sub1
with the number of extra butterflies you want to gift the user. - Add another parameter name
deep_link_sub2
and set it to the number of extra points you want to gift the user.
- Set the
- Copy your template subdomain(with the extension
.onelink.me
). - For Android - paste it into the
AndroidManifest.xml
file android host. You can find it inAssets/Plugins/Android/AndroidManifest.xml
. - For iOS - add the subdomain to the associated domains in Xcode before runing the app. Learn more here.
Copy your custom template ID and paste it in the Start()
method of the AppsFlyerObjectScript
object. You can find the script in Assets/AppsFlyer/AppsFlyerObjectScript.cs
.
We highly recommend running and testing your app on a real iOS or Android device(and not a simulated one).
- Now that your app is running, click the link and see your DeepLink values under the Referral Bonuses window.
- You can invite a friend using the Share button, and generate your own link.
- Start playing our awesome game and share your highest score with friends.