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. Dismiss Notice

Feedback Keep resolving packages

Discussion in 'Package Manager' started by George1993, Aug 20, 2023.

  1. George1993

    George1993

    Joined:
    Mar 21, 2022
    Posts:
    4
    Unity version is 2021.3.10f1. When I focus the mouse from other windows to the unity window, the resolving packages will start. The console log prompts that some resources have been changed, like this
    "The package cache was invalidated and rebuilt because the following immutable asset(s) were unexpectedly altered". Although I have not done anything, and the package is not the same.This prevents me from using unity at all.
     

    Attached Files:

  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,899
    Try updating to the latest patch version first. The .10 version is nearly 40 patch versions behind.

    Are you sure you did not modify the SpriteLight.png file, not even within the Editor/Inspector? Because package files are readonly (immutable) and must not be edited. That‘s what the message states happened, so somehow it must have happened.
     
  3. George1993

    George1993

    Joined:
    Mar 21, 2022
    Posts:
    4

    I'm pretty sure. Because I have deleted the Library folder and reopened the project.
     
  4. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    481
    Hi @George1993,

    Do you have any custom import logic, by any change? I see in the Editor.log the following stack trace:
    Code (CSharp):
    1. CustomAssetImpoter:SetLabel (string,string) (at Assets/Scripts/Editor/AssetImportHelpr/CustomAssetImpoter.cs:86)
    2. CustomAssetImpoter:SetImportedLabel (string) (at Assets/Scripts/Editor/AssetImportHelpr/CustomAssetImpoter.cs:71)
    It's likely that your code is changing import settings/metadata on the textures being imported, which would result in their meta files being changed, in turn triggering the error, and the import loop.

    As a suggestion, you could modify the code in Assets/Scripts/Editor/AssetImportHelpr/CustomAssetImpoter.cs to not perform this when the asset's path begins with "Packages/", for instance.
     
  5. George1993

    George1993

    Joined:
    Mar 21, 2022
    Posts:
    4
    Yes,I do have custom import rules. Let me try.
     
  6. George1993

    George1993

    Joined:
    Mar 21, 2022
    Posts:
    4
    Thanks for the tip, it is indeed a problem with custom import rules. Thanks
     
  7. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    481
    Hi @George1993,

    I'm glad you fixed the problem, thanks for letting us know!