Skip to content

Code Reference

CognitiveVR Namespace

Code references on this page assume you are using the CognitiveVR namespace.

using CognitiveVR;

Session Name

You can set a custom name for a user's session. This can be useful for organizing sessions in SceneExplorer. If you do not provide a session name, one will be generated for you. This can be changed on the dashboard. You can set a session name before or after the session is initialized.



A LobbyId connects multiple user sessions together to display a multiplayer experience. Please get in contact to discuss your implementation details.

To see more info on this, go to the Lobby System page.


Recording a user name for a user allows you to see how they experience multiple sessions, potentially across multiple devices. This will not set the Session Name that you can see on the dashboard. Think of this as a unique User ID that you might set for a logged in user.

This can be added at Initialization:


void Start()
    var UserProperties = new List<KeyValuePair<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)
    Core.SetSessionProperties(new Dictionary<string, object> {
            { "PremiumUser", true },
            { "SignUpPromotionUsed", "FreeMonthTrial" }


Custom Events

For an explanation about Custom Events, refer to the Custom Events page.

new CognitiveVR.CustomEvent("Some Event Happened").Send();