Dim lights while camera (player) comes closer to the light source

Hello!

I am very new in Unity, trying to solve a thing. How can I dim lights while the camera/player moving away from the light source? I need to study architectural dynamic lighting/sensors, it’d be great if you could help.

Thank you!

On a script on your light object, use Vector3.Distance() to get the distance between the light and the player’s object, then use that to calculate what you want the light’s intensity to be and set its intensity variable.