Light intensity is leaking memory in 7.1.6

I was testing the latest Enviro beta with 7.1.6 and it appeared the Unity Editor has become unusable. Everything was fine in 7.1.5. @Vondox found out that this is because of the light intensity. I volunteered to do the bug reporting. Reproducable:

  • open Unity HDRP standard scene
  • add this script to the Directional Light component
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DriveDirectionalLight : MonoBehaviour
{
    public Light directionalLight;
    [Range(0f,10000f)]
    public float lightIntensity = 500f;

    void Update()
    {
        directionalLight.intensity = Mathf.Lerp(directionalLight.intensity,lightIntensity,Time.deltaTime * 1f);
    }
}
  • hit play and watch memory grow rapidly (within seconds) in task manager

Disable the script and everything is fine.

I uploaded a reproducable project. Case id is 1205076.

4 Likes