I have enabled light estimation on the AR session but it does not react to the lights. I'm using a Samsung Galaxy S8
The option enables it on the device, but you need to subscribe to the ARSubsystemManager's camerFrame event, which will provide lighting information. ARFoundation does not do anything automatically with this information other than provide it to you.
This is based on ARKit's UnityARAmbient and works for me:
```c#
using UnityEngine;
using UnityEngine.XR.ARFoundation;
[RequireComponent(typeof(Light))]
public class ARLightAmbient : MonoBehaviour
{
private Light l;
void Start ()
{
l = GetComponent<Light>();
ARSubsystemManager.cameraFrameReceived += OnCameraFrameReceived;
}
void OnCameraFrameReceived (ARCameraFrameEventArgs eventArgs)
{
l.intensity = eventArgs.lightEstimation.averageBrightness.Value;
l.colorTemperature = eventArgs.lightEstimation.averageColorTemperature.Value;
}
void OnDisable ()
{
ARSubsystemManager.cameraFrameReceived -= OnCameraFrameReceived;
}
}
```
Most helpful comment
This is based on ARKit's UnityARAmbient and works for me:
```c#
using UnityEngine;
using UnityEngine.XR.ARFoundation;
[RequireComponent(typeof(Light))]
public class ARLightAmbient : MonoBehaviour
{
private Light l;
}
```