The Unity Hub
application is required for development and testing. Inside of Unity Hub
, you will be required to download the current version of the Unity
app.
Download the Unity Hub. The free version works for development and testing, but a Unity Pro license is required for distribution. See Distribution below for details.
Plugins for a Unity project use the following folder structure:
{Project}/Assets/Plugins/{Platform}
- Download ACPGriffon-0.0.1-Unity.zip
- Unzip
ACPGriffon-0.0.1-Unity.zip
- Import
ACPGriffon.unitypackage
via Assets-Import Package
Note: Unity Griffon plugin needs ACP Core Plugin to work. Import ACPCore.unitypackage to you project before using Griffon.
Note: It is required to initialize the SDK via native code inside your AppDelegate and MainApplication for iOS and Android respectively. For more information see how to initialize Griffon
using com.adobe.marketing.mobile;
using AOT;
public class MainScript : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
ACPGriffon.RegisterExtension();
}
}
string griffonVersion = ACPGriffon.ExtensionVersion();
Note: Refer Griffon to learn more about Griffon session.
ACPGriffon.StartSession(url);
Note: Read more about Griffon Session url
Start Griffon session using Deeplink
Ensure that Assets/Plugin/Android/AndroidManifest.xml contains the following Intent-Filter in UnityPlayerActivity(or it's child class).
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:theme="@style/UnityThemeSelector">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="grifflab" />
</intent-filter>
</activity>
Note: Replace the scheme grifflab with your scheme.
Go to iOS Player setting and you scheme under supported URL scheme.
Tests are located at at unity-acpgriffon/ACP-Griffon/Assets/Scenes/Tests.
Note: Before running the tests ensure that you have Android or iOS phone/simulator connected.
- Select platform Android/iOS in Build Settings and choose test phone/simulator.
- Open Test Runner via Window > General > Test Runner
- Select the tests to run and hit Run Tests.
Sample App is located at unity-acpgriffon/ACP-Griffon/Assets/Scenes. To build demo app for specific platform follow the below instructions.
- Download ACPCore-0.0.1-Unity.zip
- Unzip
ACPCore-0.0.1-Unity.zip
- Import
ACPCore.unitypackage
via Assets->Import Package
- Make sure you have an Android device connected.
- From the menu of the
Unity
app, select File > Build Settings... - Select
Android
from the Platform window - If
Android
is not the active platform, hit the button that says Switch Platform (it will only be available if you actually need to switch active platforms) - Press the Build And Run button
- You will be asked to provide a location to save the build. Make a new directory at unity-acpgriffon/ACPGriffon/Builds (this folder is in the .gitignore file)
- Name build whatever you want and press Save
Unity
will build anapk
file and automatically deploy it to the connected device
- From the menu of the
Unity
app, select File > Build Settings... - Select
iOS
from the Platform window - If
iOS
is not the active platform, hit the button that says Switch Platform (it will only be available if you actually need to switch active platforms) - Press the Build And Run button
- You will be asked to provide a location to save the build. Make a new directory at unity-acpgriffon/ACPGriffon/Builds (this folder is in the .gitignore file)
- Name build whatever you want and press Save
Unity
will create and open anXcode
project- From the Xcode project run the app on a simulator.
- If you get an error
Symbol not found: _OBJC_CLASS_$_WKWebView
. Select the Unity-iPhone target -> Go to Build Phases tab -> AddWebkit.Framework
toLink Binary with Libraries
.
Looking to contribute to this project? Please review our Contributing guidelines prior to opening a pull request.
We look forward to working with you!
This project is licensed under the Apache V2 License. See LICENSE for more information.