void Start() { IntPtr handle = new IntPtr(0); //SenselFrame frame = new SenselFrame(); SenselDeviceList list = new SenselDeviceList(); SenselSensorInfo sensor_info = new SenselSensorInfo(); list.num_devices = 0; Sensel.senselGetDeviceList(ref list); Debug.Log("Num Devices: " + list.num_devices); if (list.num_devices != 0) { Sensel.senselOpenDeviceByID(ref handle, list.devices[0].idx); } if (handle.ToInt64() != 0) { Sensel.senselGetSensorInfo(handle, ref sensor_info); Debug.Log("Sensel Device: " + System.Text.Encoding.Default.GetString(list.devices[0].serial_num)); Debug.Log("Width: " + sensor_info.width + "mm"); Debug.Log("Height: " + sensor_info.height + "mm"); Debug.Log("Cols: " + sensor_info.num_cols); Debug.Log("Rows: " + sensor_info.num_rows); Sensel.senselClose(handle); } }
void OnDestroy() { foreach (var mesh in _tempMeshes) { Mesh.Destroy(mesh); } _tempMeshes.Clear(); if (_handle != IntPtr.Zero) { Sensel.senselStopScanning(_handle); Sensel.senselClose(_handle); } }