Skip to content

Integrating the plugin

Juan Pomares Bernabeu edited this page Jun 21, 2017 · 4 revisions

Integrating the plugin

Following this simple steps, you can integrate the created plugin to Unity project.

Creating the Unity project

First of all, we need a Unity project.
At the ‘Build Settings’, switch to Android Platform and click to ‘Player Setting…’.

Selecting platform

Modifying the Player Settings

Change the “Minimum API Level” and the “Bundle Identifier”. Use the same values specified before in the library.

Specifying minimum level and bundle identifier

In the Publishing Settings, specify the same Keystore, alias and pasword used to sign the wearable app.

Specifying the keystore

Copying the necessary files

Copy the files located in “Plugins Files.zip\Unity Assets” to the Assets of the Unity project.

Copying assets

Open the folder Plugins/Android in the project Assets.
Delete the file “copy_here_your_android_plugin.jar”.
Copy your library created before to this directory.

Copying library

Open the folder Plugins/Android/res/raw in the project Assets. Delete the file “copy_here_your_wearable_app.apk”. Copy your wearable app created before to this directory.

Copying Wear APK

Modifying XML files

In the ‘Plugins/Android/AndroidManifes.xml’ and ‘Plugins/Android/res/xml/wearable_app_desc.xml’, change '*your.package.name*' to the package name.

Modifying XML files

Next step

Until now, you have created and integrated the plugin to the Unity project.
You can continue to the next step, Using the plugin