Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Bug Why are asset store packages suddenly installing as read-only?

Discussion in 'Editor & General Support' started by gnovos, Mar 10, 2024.

  1. gnovos

    gnovos

    Joined:
    Apr 29, 2020
    Posts:
    39
    Edit: Nevermind, this was a Windows issue, not a Unity issue. I don't know how to delete a thread, but this is no longer valid.
     
    Last edited: Mar 10, 2024
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    7,000
    No, this was always the case.

    But whether a package is read-only depends on WHERE you install it from.
    Registry packages installed from the Package Manager list as well as "add by name" are typically readonly, with few exceptions that install themselves locally under the project's PackageCache folder.

    I believe "add from git url" also makes a package read-only, which may be unexpected since you are likely going to want to be able to edit your own git package.

    "add from disk" packages are always writable. This is what you are supposed to use to develop (modify) your own custom packages. The "disk" location is where the local git repository for the package is. This also allows you to share the same package repository with multiple projects.
    The downside is, unless you manually make the path relative in manifest.json, moving the package location or sharing the project with someone else will have missing packages.


    Keep in mind that it's bad practice to make edits to normally readonly packages, specifically the registry packages. Typically there's a better way like subclassing or using reflection to access an internal method.
     
  3. gnovos

    gnovos

    Joined:
    Apr 29, 2020
    Posts:
    39
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    7,000
    Ah okay. What part (file) of that asset is readonly? Is it not editable to begin with, or will it revert on the next domain reload after making an edit?
     
  5. gnovos

    gnovos

    Joined:
    Apr 29, 2020
    Posts:
    39
    Everything in the package was marked as read-only. But between the time I posted this and right now, windows just forced an update. And now everything is back to normal. I'm sorry, I think this was a Windows issue not a Unity issue. I think it's solved now Thanks for the help, though!
     
    CodeSmile likes this.
  6. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,212
    Some go in as packages, so are then not editable, Ive seen that.