Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Light intensity is leaking memory in 7.1.6

Discussion in 'High Definition Render Pipeline' started by Rowlan, Dec 12, 2019.

  1. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,842
    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

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class DriveDirectionalLight : MonoBehaviour
    6. {
    7.     public Light directionalLight;
    8.     [Range(0f,10000f)]
    9.     public float lightIntensity = 500f;
    10.  
    11.     void Update()
    12.     {
    13.         directionalLight.intensity = Mathf.Lerp(directionalLight.intensity,lightIntensity,Time.deltaTime * 1f);
    14.     }
    15. }
    16.  
    * hit play and watch memory grow rapidly (within seconds) in task manager

    Disable the script and everything is fine.
     
    Last edited: Dec 12, 2019
  2. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,842
    I uploaded a reproducable project. Case id is 1205076.