void HandleOnDepthSensorUpdateEvent(nuitrack.DepthFrame frame) { if (depthFrame != null) { depthFrame.Dispose(); } depthFrame = (nuitrack.DepthFrame)frame.Clone(); //Debug.Log("Depth Update"); onDepthUpdate?.Invoke(depthFrame); }
void HandleOnDepthSensorUpdateEvent(nuitrack.DepthFrame frame) { if (DepthFrame != null) { DepthFrame.Dispose(); } DepthFrame = (nuitrack.DepthFrame)frame.Clone(); try { onDepthUpdate?.Invoke(DepthFrame); } catch (Exception ex) { Debug.LogException(ex); } }