Skip to content

Built-In Components

Components represent standalone scripts designed to capture data in various commonly sought-after categories. They're crafted for effortless integration and are minimally reliant on specific project configurations. Most of them are added by default to the Cognitive3D_Manager prefab, additional components may be included based on your selections in the scene setup window.

You can find all of these within the Cognitive 3D SDK/Runtime/Components directory. These components are configured such that only one instance of each can be added to a game object. Unless otherwise stated, components record data at a default of 10Hz.

Default Components

HMD Height

Samples the height of a participant's HMD. Average is assumed to be participant's eye height.

Room Size

Sends custom events and sensor data related to when users exit their specified boundaries, modify those boundaries, or recenter within them.

Arm Length

Collects distances from the HMD to the participant's controller. The maximum is assumed to be roughly the participant's arm length.

Frame Rate

Records a sensor for the average, 1% low, and 5% low for framerate over time.

In cases where you are using Meta's Asynchronous Space Warp (ASW), the Meta SDK will cap the framerate to half of the device's refresh rate and inject a synthetic frame for every frame rendered by the engine. As a result, the framerate perceived by the user will be twice that is reported by the engine. To correct for this, our SDK will double the value written to the framerate sensor. In addition, for all frames ASW is enabled and active, the c3d.app.meta.spaceWarp sensor value will be set to 1.

To identify sessions where ASW was used, you can search for all sessions where the session property c3d.app.meta.wasSpaceWarpUsed == true.

HMD Present Event

Sends Custom Events when a participant removes or wears their HMD.

Battery Level

Send the battery level of an Android device after initialization and on quit. This requires building the project to an Android device. This component records data at 0.1Hz.

Controller Tracking

This component is used to send custom events when controllers lose tracking and record controller height relative to HMD position. This component records data at 1Hz. This is different from controller position and rotation which are handled as dynamic objects, at the default rate of 10Hz.

Controller Input Tracker

Records a Dynamic Object property when common controller inputs occur. This is visible in Scene Explorer.

Oculus Hardware

Sends sensor data representing the following data points. Please note that this will only report data if you are building for the Oculus platform and have Oculus Integration selected in the project setup window.

  • Battery Temperature
  • CPU Level
  • GPU Level
  • Power Saving Mode

HMD Orientation

Sends sensor data representing the pitch and yaw of the HMD.

Profiler Sensor

Sends sensor data representing the following Unity profiler metrics. Please note that this only works on Unity versions >= 2020.2. This component records data at 1Hz.

  • Number of draw calls
  • System memory usage in MB
  • Main thread time in ms

Optional Components

These components can be added by drag-and-drop or by the Add Component option in the inspector window.

HMD Collision Event

Sends Custom Events if the HMD collides with something in the game world. Collision LayerMask can be set on the component.

Controller Collision Event

Sends Custom Events when either controller collides in the game world. Collision LayerMask can be set on the component.

Teleport Event

Sends a Custom Event when a player's HMD root transform changes positions. This is not triggered when the player walks while using roomscale. If the player moves without an immediate teleport, do not use this component!

In the inspector window, drag and drop the GameObject that moves when user teleports.

Multiplayer components

If you are building a multiplayer app, then you can get additional analytics by making use of the following components.

Photon Multiplayer

If you are using Photon PUN2 as your multiplayer framework, then you can use the Photon Multiplayer component to get additional details. Currently this component provides custom events when players create, join, leave, or are disconnected from rooms. In addition, it also provides sensors for Round-trip time (RTT/ping), and RTT variance. This component also automatically creates a LobbyID and assigns it to all participants on your behalf. This will allow you to identify several players in the same experience at once. For more information refer to our page on multiplayer.

To enable this component, please check the PUN2 checkbox in the project setup window, and press Next. The project will take a few seconds to compile.

pun2 support setup

With multiplayer support enabled, the SDK will automatically add a Photon Multiplayer and Photon View component to the Cognitive3D_Manager prefab whenever you go through the scene setup process. The below image shows the two components added to the Cognitive3D_Manager.

pun2 enabled cognitive manager

Note

Please ensure that there is either only Cognitive3D_Manager with a Photon View component across all your multiplayer scenes or that the ViewID in each of the PhotonView components is different.

Oculus-specific components

This image shows an additional way to enable the following three optional Oculus-specific components.

oculus specific components

Oculus Social Data

Performs an entitlement check, sends the Oculus AppID, participant's Oculus ID, and participant's display name as session properties. Developer might need to set up their app on the Oculus Dashboard to access this information. Requires the developer to input an AppID in the Oculus Platform Settings window. Select the Oculus Social Data option in the Additional Oculus Setup page of the scene setup window to add this component.

The image below shows where to input the Oculus AppID in Unity.

oculus social component setup

Please note that this component has some additional settings you can configure from the inspector window.

  • Record Oculus User Data: Select this option if you wish to gather participants' Oculus IDs for identification purposes.

For Initialize Type, there are three options:re

  • Automatic: This is the default choice. This will automatically complete an entitlement check and associated callbacks when the session begins.
  • Delayed: Waits until you call Oculus.Platform.Core.Initialize() to perform the entitlement check.
  • Manual : If you select this option, you need to execute the code below to get this component started.
  var oculusSocial = FindObjectOfType<Cognitive3D.Components.OculusSocial>();
  if (oculusSocial != null) {oculusSocial.BeginOculusEntitlementCheck(Cognitive3D.Components.OculusSocial.GetAppIDFromConfig());}

oculus social component inspector

The below image shows how the user's oculus data will be displayed on the dashboard. oculus social session property

Oculus Passthrough

Sends sensor values representing whether passthrough is enabled and custom events when passthrough state changes. For more information on enabling passthrough on Oculus devices, please visit the Get Started with Passthrough page. This component records data at 1Hz.

Select the Mixed Reality option in the Additional Oculus Setup page of the scene setup window to add this component.

HandTracking

Sends events when the participant switches from controllers to using hands or vice versa.

Select the Quest Hand Tracking option in the Additional Oculus Setup page of the scene setup window to add this component.

hand tracking events

Reserved Components

Room Tracking Space

This is added to the user's tracking space identified in the scene setup window to help find the game object in the scene. This doesn't send any events or sensor data.

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.