private void HandleFrameReceivedCallback(ARCameraFrameEventArgs obj) { ARLightEstimationData lightEstimation = obj.lightEstimation; Debug.Log("Camera Frame received"); avgBrightness = lightEstimation.averageBrightness != null ? (float)lightEstimation.averageBrightness : -1; avgColorTemp = lightEstimation.averageColorTemperature != null ? (float)lightEstimation.averageColorTemperature : -1; colorCorrection = lightEstimation.colorCorrection != null ? (Color)lightEstimation.colorCorrection : Color.black; }
void OnCameraFrameReceived(ARCameraFrameEventArgs camFrameEvent) { ARLightEstimationData led = camFrameEvent.lightEstimation; if (led.averageBrightness.HasValue) { lightComponent.intensity = led.averageBrightness.Value; } if (led.averageColorTemperature.HasValue) { lightComponent.colorTemperature = led.averageColorTemperature.Value; } }