NOTE: CognitiveVR has been rebranded to Cognitive3D. Code references, methods, menus, and variables remain untouched.

Code Reference


using CognitiveVR;


Recording a unique id for a user allows you to see how they experience multiple sessions, potentially across multiple devices.

This can be added at Initialization:


void Start()
    var UserProperties = new Dictionary<string,object>();
    CognitiveVR_Manager.Instance.Initialize("John Smith", UserProperties);

Or this can be added while your application is running:

//some function in your app when you know who has logged in
void OnPlayerLogIn(string UserName)
    CognitiveVR.EntityInfo myNewUser = CognitiveVR.EntityInfo.createUserInfo(
        properties: new Dictionary<string, object> {
            { "PremiumUser", true },
            { "SignUpPromotionUsed", "FreeMonthTrial" }

    CognitiveVR.Core.registerUser(myNewUser, delegate(CognitiveVR.Error registerError) {});


For an explanation about transactions, refer to the Transactions page.

Instant Transaction
CognitiveVR.Instrumentation.Transaction("A Transaction Happened").beginAndEnd();
Begin Extended Transaction
CognitiveVR.Instrumentation.Transaction("Extended Transaction").begin();
End Extended Transaction
CognitiveVR.Instrumentation.Transaction("Extended Transaction").end();
One Transaction Property
CognitiveVR.Instrumentation.Transaction("Level Selected")
    .setProperty("Level_Name", "store")
Multiple Transaction Properties
CognitiveVR.Instrumentation.Transaction("Level Selected")
    .setProperty("Level_Name", "store")
    .setProperty("Level_Time", "night")
CognitiveVR.Instrumentation.Transaction("Level Selected")
    .setProperties(new Dictionary<string, object> {
      { "Level_Name", "mall" },
      { "Level_Time", "afternoon" }