Search Unity

Packages break and I keep restarting

Discussion in 'Package Manager' started by marwi, Aug 5, 2019.

  1. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    23
    Hello,

    I'm sure I'm not the only one with that issue and I did hestitate to write anything about it in here for long but the issue keeps coming back and I dont know what I am doing wrong.

    Yesteday I did reset my git project to a older version (around 6 weeks back) to test updating the player with squirrel. Today I updated git to the current status and the console was spammed with HDRP errors, precisely:

    System.Exception: Cannot load. Incorrect path: Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ShaderGraph/AutodeskInteractive.ShaderGraph Null returned.
    ...

    So I did restart Unity a couple of times hoping it would resolve broken packages as it did in the past. It didnt help this time.
    Then I read on SO that it might help to remove the Scriptable Core, ShaderGraph and finally HDRP and then reinstall just HDRP which would then resolve its dependencies so I did just that.
    I installed the same HDRP version as before and package manager said its dependencies SR-Core and ShaderGraph are installed (although they didnt show up in the "Packages/In Project"). So I switched to all packages and manually clicked install on SR Core and ShaderGraph again. Restarting Unity. Same error as before, so nothing changed.
    At first i tried to just delete the HDRP, ShaderGraph and SRCore packages in "<MyProject>\Library\PackageCache" and restart but that didnt change anything.
    I then went into "C:\Users\<user>\AppData\Local\Unity\cache\packages\packages.unity.com" AND "<MyProject>\Library\PackageCache" to manually delete cached packages. Restarting Unity once - some packages were resolved and I suddenly got errors about a missing Autodesk namespace. I didnt touch any Autodesk or FBX Packages so I tried to restart a couple more times but the error didnt go. I then deleted the Autodesk.fbxand unity.formats.fbx packages in both directories mentioned above and voila: all errors gone.

    So my problem with this is:
    I dont know why my packages broke in the first place through resetting git to a previous version - package caches should be unaffected by that, right? Especially those in AppData?
    And then I would love a package manager option to "clean caches" or at least have a "fresh install" button to NOT use broken (?) packages in a cached folder.
    Oh and while I'm at it: Why do I have to restart unity so often when working with new packages for the first time? Like HDRP... I never know for sure if the error is just something isnt quite resolved yet or there is still something missing and that is a bit frustrating to say the least.

    Working with 2019.1.6f1 on this particular project if that's relevant.
     
    Last edited: Aug 5, 2019
    fherbst likes this.
  2. erick_unity

    erick_unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    41
    hi @marwi, i'll find someone from the render pipeline team to help you out. Can you please share your manifest.json file, so we can repro?
     
  3. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    23
    Hello Erick, thanks for the reply. Sure no problem.

     
  4. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,093
    pacakge manager auto includes dependencies (of the correct version), you don't need to have:

    Code (CSharp):
    1. "com.unity.render-pipelines.core": "5.16.1",
    2. "com.unity.render-pipelines.high-definition": "5.16.1-preview",
    3. "com.unity.shadergraph": "5.16.1",
    4.  
    You just need the HD reference and it will pull in the right version of core and shadergraph.
     
  5. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,093
    That being said we can't diagnose the issue easily without the project, can you please log a bug.
     
  6. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    23
    I haven't edited the manifest manually and just asked my team who confirmed: they also haven't edited the manifest file directly