Provides a UnityPackage for logging data to CSV and to MySQL databases. For examples of using the LoggingManager, see the included LoggingExample.cs.
The LoggingManager optionally supports sending data to a MySQL database (See Builds/ folder). When enabled, the package will ask for credentials at runtime and save them to disk (and never ask again). Optionally the credentials can be compiled into binaries for deployment purposes.
Students should get credentials via their supervisor.
Good Logging Practices
using System;) (This is automatically done by LoggingManager).
Time.Framecountso you can investigate issue of game lag and verify the timing of events. (This is done automatically by LoggingManager)
- Log a
ParticipantIDto assign a unique ID to each participant.
- Log a
TestIDto assign a unique ID to each test. Even if you do one test per participants, sometimes tests are redone, due to e.g. mistakes in the procedure or technological faults.
- Rather than counting the occurance of something in Unity (aggregating data), log important events every frame. This way we can backtrack what happened. If I/O performance is a problem, then write initially to memory.
SceneManager.GetActiveScene()to log current scene (requires
transform.eulerAnglesto log rotation of an object - you don’t want to log object rotation, only to find out that you accidentically logged Quaternion coordinates (and forgot the
transform.localPositionin addition to
transform.positionwill work fine, except if your VR scene calibrates by rotating some parent object. This will leave you with inconsistent coordinates between participants. Log both X, Y and Z coordinates.
- Version number of what is running somehow. Need to investigate how to do this with Unity.
- If you log an event which has a start, a duration and and end, make sure you always measure all three. Measuring Duration fx with Time.deltaTime might not be as reliable as measure distance between two System.Datetime.Now timestamps.
For Eye Tracking
- For Eye Tracking, log
hemi_gazein addition to any transformed
world_gaze. When Unity transforms viewport points to world points, there may be a certain inaccuracy.