Adding Custom Events
Adding Custom Events in InsightXR with Enhanced Verification and Replays
After integrating InsightXR with your Unity project and setting up tracking scripts, the next pivotal step is adding custom events. These events are crucial for capturing specific interactions or milestones that are key to your training program. Here's an updated guide on how to implement custom events effectively, incorporating enhanced verification methods similar to the tracking script setup.
Preparing for Custom Event Implementation
Identify Key Moments for Tracking: Determine the crucial actions or scenarios within your training environment you wish to track as custom events. This could include interactions like completing a task, entering a specific area, or using a tool.
Accessing InsightXR’s Custom Event Features: Navigate to the InsightXR package within your Unity project, focusing on the features that enable custom event tracking.
Adding and Verifying Custom Event Tracking
Selecting the Relevant Script: Open the script where you plan to track the custom event. This should be a script attached to an object or part of the scenario directly involved with the event.
Importing InsightXR Namespace: At the top of your script, add
using InsightXR;
to access InsightXR’s functionalities.Implementing Custom Event Tracking: In the script, find the point where the action corresponding to your custom event occurs. Here, insert the code to log the event with InsightXR, such as
InsightXR.logEvent('CustomEventName');
, replacing 'CustomEventName' with the name of your event.Saving and Testing the Custom Event: After adding the custom event tracking, save your script. Run your XR environment in Unity and perform actions that trigger your custom events.
Console Verification: Check the Unity console for logs prefixed with
InsightXR:
to confirm that your custom events are being triggered as expected. This verification step ensures that the events are accurately captured and logged.Dashboard Verification: Subsequently, verify that these events are being reflected on the InsightXR dashboard. You should see the custom events listed, providing real-time data and insights based on the actions performed in the Unity scene.
Fine-Tuning Custom Events: If necessary, adjust the event names, script placements, or triggers based on the initial test results to optimize the accuracy and relevance of the data captured.
Conclusion
Incorporating custom events with enhanced verification in InsightXR greatly enriches the analytics of your XR training application. By meticulously implementing and verifying these events, you can ensure that every critical interaction within your training scenario is captured and analyzed. This level of detail enables a more tailored and effective training experience, bolstering the overall value of your XR training program.
Last updated
Was this helpful?