void HandleOnColorSensorUpdateEvent(nuitrack.ColorFrame frame) { if (colorFrame != null) { colorFrame.Dispose(); } colorFrame = (nuitrack.ColorFrame)frame.Clone(); //Debug.Log("Color Update"); onColorUpdate?.Invoke(colorFrame); }
void HandleOnColorSensorUpdateEvent(nuitrack.ColorFrame frame) { if (ColorFrame != null) { ColorFrame.Dispose(); } ColorFrame = (nuitrack.ColorFrame)frame.Clone(); try { onColorUpdate?.Invoke(ColorFrame); } catch (Exception ex) { Debug.LogException(ex); } }