Search Unity

Updating HDRP crashed, out of memory

Discussion in 'Editor & General Support' started by Tensor2, Nov 23, 2020.

  1. Tensor2

    Tensor2

    Joined:
    Sep 13, 2015
    Posts:
    12
    Updating HDRP version requires updating all materials (See: https://docs.unity3d.com/Packages/c...h-definition@8.2/manual/Material-Upgrade.html). This process attempts to simultaneously load every asset. Before getting even a quarter of the way through, it consumes over 40GB of vram and crashes the entire system. Project cannot be opened.

    This is similar to the problem of deleting and rebuilding the library folder. That process has the same problem, but at least it can resume where it left off after crash and eventually finish after crashing all day. I know others have had that issue.

    Does anyone have a proper fix to reimporting assets in batches? Removing all the assets from the project and re-adding them obviously breaks all usage of them and costs months of work.
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    I'm still on HDRP 7, but there's an option under 7 to upgrade selected materials to the current version. Maybe you can manually do the material upgrade in batches, where you select some number of materials, upgrade them, and then hopefully get through all of them a few at a time? It's tedious, but it might work. Or does the upgrade to 8 force the material upgrade? (I seem to recall it being an optional step in earlier version upgrades.)
     
  3. Tensor2

    Tensor2

    Joined:
    Sep 13, 2015
    Posts:
    12
    As I believe I explained, it happens immediately upon trying to open the project. I cannot open the project. Clicking a menu is not possible.
     
  4. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hey,
    This is an unfortunate situation (but sadly not exceptional) that we will try to fix in 2021.
    A workaround that should work for your situation is to edit the HDRP file in ProjectSettings: HDRPProjectSettings.asset

    There is a member
    m_LastMaterialVersion: 11

    You need to change this last version number to what it is suppose to be after the upgrade (Sadly I don't remember which number it is suppose to be for 8.2.0 so will suggest to do 1 increase and if it still show the upgrade dialog box, increase again.

    This will prevent from loading all the material in the project. Material that you load in your scene will still update on the fly (so you will need to save each of your scene after update).

    hope it help.
     
  5. jleemans

    jleemans

    Joined:
    Apr 22, 2020
    Posts:
    19
    I'm trying to update our project from 2020.1 to 2020.2 and this issue is still present (Moving URP from 8.xx to 10.xxx). Really sad, it make it very difficult to update Unity on big project.
    Will try the workaround.
    Is it important to open level and resave it ? Or we can just select materials in project and reimport + save ?
     
  6. jleemans

    jleemans

    Joined:
    Apr 22, 2020
    Posts:
    19
    The workaround did work
     
  7. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    715
    Glad I found this thread. Btw this hasn't been fixed in 2021.2 yet.