Verisoul Docs
Search
K

Unity

Installation

Please reach out for the latest download of the package. Let us know which version of Unity you're using as well.
  1. 1.
    Import the SDK to your Unity Project and add the VerisoulManager prefab to your scene
Ensure the prefab keeps the name VerisoulManager. Any modifications to the name will make it so browser javascript won't be able to communicate with Unity (see here)
  1. 2.
    Add the SDK to the first scene your application uses by initializing it with the appropriate environment, webview system type and project ID
using UnityEngine;
using Verisoul;
private void Start()
{
VerisoulManager.Instance.Init(environment, WebviewType.VUPLEX, projectId, (url) =>
{
// open url in a webview and handle closing
webViewManager.OpenURL(url);
});
}
Currently, three unique webview systems are supported. If you don't see an integration option that works for you please reach out and we may be able to accommodate.
WebviewType
Description
REDIRECT
the webview redirects to another page upon completion
UNIWEBVIEW
the webview will post a message via UniWebView's messaging protocol
VUPLEX
the webview will post a message using window.vuplex object

Usage

Pilot

The pilot integration is a client side only integration. In order to create actionable insights we need a join-key. After the user is authenticated in your system call the OnAuth function to pass a join key with an account identifier.
The VerisoulManager object uses DontDestoryOnLoad so the OnAuth function can be called at anytime. You can see an example of how to call OnAuth in a scene by looking at the Demo Scenes included in the package. You can also see examples at each build specific page below.

Production

In order to ensure adequate security, for production you'll need to pass the auth_id via backend API call to Verisoul's API.
You can use GetTrackingId() to get the current client's trackingId and join it with the account identifier via API Call. You can see an example of how to call GetTrackingID() in a scene by looking at the Demo Scenes included in the package. You can also see examples at each build specific page below.

Examples