Search Unity

Package Cache error

Discussion in 'Editor & General Support' started by philspitlerSF, Jul 4, 2019.

  1. philspitlerSF

    philspitlerSF

    Joined:
    Oct 10, 2018
    Posts:
    37
    I'm trying to load a Unity 2019 project into 2018 and am getting a bunch of errors in the console similar tho this one... any ideas?

    Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Runtime/UNetwork.cs(405,25): error CS0122: 'NetworkDetailStats' is inaccessible due to its protection level

    Thanks

    Phil
     
  2. Downgrading is not supported in Unity. It never was. If you have a version before you got to the higher version of Unity you will need to go back to that in your version control system, otherwise you need to recreate it in Unity.

    You can try to fix everything for yourself, but it's hard and sometimes it's impossible. In case of the networking some time Unity moved the internal package into package manager package. So I believe you can remove the package from the package manager (and then open up the package cache folder and remove the files there as well).
     
    Azurne likes this.
  3. philspitlerSF

    philspitlerSF

    Joined:
    Oct 10, 2018
    Posts:
    37
    ahhh... good to know... luckily the project isn't too complex to rebuild.

    Do you know if I can have Unity 2018 and 2019 open art the same time to copy and paste assets?
     
  4. You can but be careful, not everything is compatible (that's why they don't support the downgrade). So be prepared that you will have problems.
     
  5. julhinhaah

    julhinhaah

    Joined:
    Sep 18, 2019
    Posts:
    1
    Maybe if you Reset packages it can works. Go to Help -> Reset Packages to Default, wel it worked with me.
     
  6. ByteOfAllTrades

    ByteOfAllTrades

    Joined:
    Apr 15, 2020
    Posts:
    1
    I can confirm the that resetting packages works for this problem. The cause, as far as I can tell, is when you import assets that are attached to a project(in my case, the pixel perfect pack). Unity will present a warning that this will change project settings, however if you reset packages this should fix it.
     
    thgsousa and Madamegato like this.
  7. ynscvk68

    ynscvk68

    Joined:
    Sep 3, 2020
    Posts:
    1
    thank u dude it worked for me
     
    MRPorridge likes this.
  8. julien-conan

    julien-conan

    Joined:
    Jun 20, 2015
    Posts:
    8
    Reset packages to default worked for me too (downgrade from 2020 to 2019 since WebGL build compression generates a lot of errors in newest Unity version)
     
  9. MFKJ

    MFKJ

    Joined:
    May 13, 2015
    Posts:
    264
    Maybe this will be helpful
     
    goldcloud144 and iydrss like this.
  10. ismayou

    ismayou

    Joined:
    Mar 21, 2018
    Posts:
    1
    thank you very much i reset packages and it really helped me
     
  11. IshanGameboy

    IshanGameboy

    Joined:
    Mar 15, 2021
    Posts:
    2
    but after resetting to default pakage,still it was showing all compiler error have to be fixed before you enter the playmode,,
    and it was showing this in console:
    Library\PackageCache\com.unity.textmeshpro@2.0.0\Scripts\Editor\TMP_PackageUtilities.cs(310,17): error CS0433: The type 'Task' exists in both 'System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
     
  12. IshanGameboy

    IshanGameboy

    Joined:
    Mar 15, 2021
    Posts:
    2
    my unity version is 2019.1
     
  13. kittenbrainsz

    kittenbrainsz

    Joined:
    May 18, 2021
    Posts:
    1



    did you find a solution for this
     
  14. iydrss

    iydrss

    Joined:
    Apr 22, 2020
    Posts:
    4
    thanks so much ^^
     
  15. pedroarruda4991

    pedroarruda4991

    Joined:
    Jan 9, 2021
    Posts:
    20
    If you use something like cinemachine and reinstall unity for some reason, make sure that you reinstall the asset/package(on this case the cinemachine) again
     
  16. goldcloud144

    goldcloud144

    Joined:
    Jun 20, 2020
    Posts:
    9
    That was great! Other solutions didn't work for me. Thank you so much.
     
    Last edited: Oct 30, 2021
  17. dineshbhathad

    dineshbhathad

    Joined:
    Jan 12, 2022
    Posts:
    5
    thanks.
     
  18. jdcorona96

    jdcorona96

    Joined:
    Apr 13, 2021
    Posts:
    1
    You are a life saver!
     
  19. Matawari_Studio

    Matawari_Studio

    Joined:
    Jun 19, 2022
    Posts:
    1
    Screen full with Pink after doing this
     
  20. avivamos1997

    avivamos1997

    Joined:
    Jun 6, 2021
    Posts:
    1
    Bro thank you for this i was on the edge of starting all from the begining until i saw your comment , you are true saver ! god bless you !
     
  21. qzv

    qzv

    Joined:
    Jul 10, 2021
    Posts:
    2
    +
     
    zchek likes this.
  22. FaberVi

    FaberVi

    Joined:
    Nov 11, 2014
    Posts:
    146
    On version 2022.1.21f1 (before the update all is ok)....

    upload_2022-10-28_18-28-46.png
     
    zchek likes this.
  23. zchek

    zchek

    Joined:
    Dec 8, 2014
    Posts:
    7
    Same, also materials go pink after reseting packages. All fine in 2022.1.20
     
  24. jlorenzi

    jlorenzi

    Joined:
    May 2, 2021
    Posts:
    292
    Yeah I tried resetting the packages and it corrupted my whole project. Make sure you make a back up before you do it.
     
  25. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,742
    "Backing up" is very oldskool. It's what we did in the 1980s and perhaps into the first part of the 1990s.

    Today it is the year 2023. We've made incredible advances in data storage technology over the past several decades.

    Source control is a VASTLY superior option to merely backing up.

    Backing up is still valid at a gross scale, but not for day-to-day use.

    Please consider using proper industrial-grade enterprise-qualified source control in order to guard and protect your hard-earned work.

    Personally I use git (completely outside of Unity) because it is free and there are tons of tutorials out there to help you set it up as well as free places to host your repo (BitBucket, Github, Gitlab, etc.).

    You can also push git repositories to other drives: thumb drives, USB drives, network drives, etc., effectively putting a complete copy of the repository there.

    As far as configuring Unity to play nice with git, keep this in mind:

    https://forum.unity.com/threads/prefab-links-keep-getting-dumped-on-git-pull.646600/#post-7142306

    I usually make a separate repository for each game, but I have some repositories with a bunch of smaller test games.

    Here is how I use git in one of my games, Jetpack Kurt:

    https://forum.unity.com/threads/2-steps-backwards.965048/#post-6282497

    Using fine-grained source control as you work to refine your engineering:

    https://forum.unity.com/threads/whe...grammer-example-in-text.1048739/#post-6783740

    Share/Sharing source code between projects:

    https://forum.unity.com/threads/your-techniques-to-share-code-between-projects.575959/#post-3835837

    Setting up an appropriate .gitignore file for Unity3D:

    https://forum.unity.com/threads/removing-il2cpp_cache-from-project.1084607/#post-6997067

    Generally setting Unity up (includes above .gitignore concepts):

    https://thoughtbot.com/blog/how-to-git-with-unity

    It is only simple economics that you must expend as much effort into backing it up as you feel the work is worth in the first place. Digital storage is so unbelievably cheap today that you can buy gigabytes of flash drive storage for about the price of a cup of coffee. It's simply ridiculous not to back up.

    If you plan on joining the software industry, you will be required and expected to know how to use source control.

    "Use source control or you will be really sad sooner or later." - StarManta on the Unity3D forum boards
     
    jlorenzi likes this.
  26. Acreates

    Acreates

    Joined:
    Dec 12, 2016
    Posts:
    41
    This seems to be a recent issue. Getting yesterday after I moved Unity via Windows move. Tried all the solutions above.
    Going to delete the library folder and rebuild the project by syncing from Perforce to find the culprit.