I’m using Pulse Physiology Engine in a Unity 2020.3.40f1 project and am getting errors trying to use PulseCSVReader with the VitalsMonitorExampleData.csv file provided in the asset.
I have set the data source for CameraCanvas->Line->Number->PulseDataNumberRenderer to PulseCSVReader and the CSV input in the PulseCSVReader component to VitalsMonitorExampleData using the Unity Inspector. An error is generated in the Inspector in the PulseDataNumberRenderer component that says “Error: Data source could not generate valid data fields”. I also get an error in the console:
NullReferenceException: Object reference not set to an instance of an object
PulseCSVReader.ComputeHeaders () (at Assets/PulsePhysiologyEngine/Scripts/PulseCSVReader.cs:158)
PulseCSVReader.OnValidate () (at Assets/PulsePhysiologyEngine/Scripts/PulseCSVReader.cs:42)
It seems like data.fields
in PulseCSVReader and source.data.fields
in PulseDataConsumerEditor are the problems, even though the CSV lines
array that should be generating the headers for data.fields
is populated and appears to be correct.