Skip to content

Comprehensive Setup Guide

You should complete the Minimal Setup Guidefirst. This page will give you an overview of the Core Features you'll encounter when implementing the SDK.

Begin and End Sessions

The default behaviour is to automatically begin a Session immediately. This can be changed on the Cognitive3D_Manager component.

initialize on start

You can disable Begin Session Automatically and manually call BeginSession later. For an example, a Participant may need to consent to data collection as described in your privacy policy. If you do not wish to record analytics for any reason, simply do not call BeginSession.

public void ParticipantConfirmed(bool AcceptedPrivacyPolicy)
{
    //if participant accepted privacy policy, begin recording analytics
    if (AcceptedPrivacyPolicy == true)
    {
        Cognitive3D.Cognitive3D_Manager.Instance.BeginSession();
    }
    //... other setup logic
}

public void ExperienceComplete()
{
    Cognitive3D_Manager.Instance.EndSession();
    //... load hub scene
}

A Session ends automatically when the application closes or the editor stops playing. In some cases you may want to manually end a Session - for example if a Participant makes multiple attempts on a training exercise without closing the application. Simply call EndSession. Sessions will persist between different scene changes.

Session Name

You can set a custom name for a Participant's Session. This is used for organizing Sessions on the Dashboard and SceneExplorer. If you do not provide a Session name, it will use the Participant Name. If that is also not provided, a Session Name will be generated for you and can be changed on the Dashboard. You can set a Session Name before or after the Session is initialized.

Cognitive3D.Cognitive3D_Manager.SetSessionName("JohnSmith_001");

Session Property

You may have some additional data to record that is relevant to the entire Session. For example if you have some variable starting parameters this is a good place to record those conditions. You can set Session Properties at any time during the experience - but they will overwrite any property with the same name.

Cognitive3D.Cognitive3D_Manager.SetSessionProperty("starting_money", 25);
Cognitive3D.Cognitive3D_Manager.SetSessionProperty("store", "main street");

Session Tags

Session Tags are similar to Properties, but can be used to isolate metrics for specific Sessions. For example, if you are doing A/B testing on a focus group, Tags would be ideal for analyzing a single group at a time. Tags can also be changed on the Dashboard after the Session is complete.

Cognitive3D.Cognitive3D_Manager.SetSessionTag("group_b");

Gaze and Fixations

Recording the participant's HMD position, rotation, and where they are looking is automatic. Most SDKs that support Fixations do not need any additional setup, but you should check the HMD Specific Informationpage to be sure.

Multiple SDKs

Some VR SDKs that support Eye Tracking are based on other hardware and allow multiple SDKs to take full advantage of a HMD. You may select multiple SDKs with Shift + Left Clicking each SDK you wish to use. For more information, see Supported Hardwareand Runtimes

multiple sdks

Scenes

For more information, see Scenes.

Data recorded by the SDK will be uploaded to the Scene that was last loaded in Unity if that Scene has been exported and uploaded to our Dashboard using the Scene Setup Window.

There are no special requirements to use this feature. Simply use your normal process to load a scene. For example:

void Update()
{
    if (Input.GetKeyDown(KeyCode.Space))
        SceneManager.LoadScene("NewSceneName");
}

Dynamic Objects

For more information, see Dynamic Objects.

Dynamic Objects have quite a wide number of uses, here are a couple common ones:

  • Recording Controller Inputs and displaying hand positions
  • Moving Objects providing more context about the scene (e.g., cars)
  • Stationary Objects the participant is interacting with (e.g., looking at billboards)

ExitPoll

For more information, see ExitPoll.

ExitPoll allows you to automatically ask questions to your Participants. There are two parts to set up:

  1. Create a Question Set and Hook on the Dashboard.
  2. Create an ExitPoll in Unity using the Hook.
public string ExitPollHook = "samplehook";
void Update()
{
    if (Input.GetKeyDown(KeyCode.Space))
        Cognitive3D.ExitPoll.NewExitPoll(ExitPollHook).Begin();
}

This will result in something like:

exitpoll in unity

Custom Events

For more information, see Custom Events.

Custom Events are a great catch-all to record when 'something' happens in your experience. There are multiple ways to add additional information for context. Here is a very simple example:

public string Category = "Pressed Space";
void Update()
{
    if (Input.GetKeyDown(KeyCode.Space))
        new Cognitive3D.CustomEvent(Category).Send();
}

You can see the events on the Dashboard on the Session Details page.

Sensors

For more information, see Sensors.

If you have any continuous value to track during your session you can record it as a sensor. We do not support any biometric sensors directly, but any value you can access in Unity can be recorded. Most sensors in most use cases do not need to be recorded at the highest frequency.

IEnumerator Start()
{
    while (Application.isPlaying)
    {
        yield return new WaitForSeconds(0.1f); // collect this sensor data at 10 Hz
        Cognitive3D.SensorRecorder.RecordDataPoint("HeartRate",GetHeartRate());
    }
}

float GetHeartRate()
{
    //return some value from your heart rate sensor
}

sensor image

Participants

For more information, see Participants.

Correctly identifying Participants during your experience allows you to track how their performance changes over time. This should include a Unique ID (such as employee number.md)and a friendly Full Name.

You can also set properties to group your participants together.

void Start()
{
    Cognitive3D.Cognitive3D_Manager.SetParticipantFullName("John Smith");
    Cognitive3D.Cognitive3D_Manager.SetParticipantId("E001");
    Cognitive3D.Cognitive3D_Manager.SetParticipantProperty("height",180);
}

Local Cache

For more information, see Local Cache.

If no internet connection is detected the SDK will temporarily store data locally. When internet connectivity is restored the SDK will automatically queue up this cached data and send it in the background.

Attributions

For more information, see Attributions.

When opening a URL from your experience you can append an Attribution Key. This can be captured on your webpage to identify which Session engaged with this content outside of your immersive experience.

void Start()
{
    string parameters = Cognitive3D.GetAttributionParameters();
    Application.OpenURL("www.example.com/product_005" + parameters);
}

intercom If you have a question or any feedback about our documentation please use the Intercom button in the lower right corner of any web page.