Search Unity

Changes made to a packages code keeps reverting

Discussion in 'Scripting' started by flipwon, Jun 24, 2020.

  1. flipwon

    flipwon

    Joined:
    Dec 29, 2016
    Posts:
    179
    I've tried to fix an issue with a package I've downloaded, and any time I restart unity these changes seem to be reverted. The package hasn't been updated or anything, so I'm unsure why it's detecting changes I've made and rolling them back.

    Anyone know how to disable this?
     
  2. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,188
    If the package is from the package manager, it's stored in a central location for all projects to use and from what I've experienced, changes there don't save. I've always had to copy that into the projects individual packages folder and then make the changes to the copy.
     
    Invertex, Graham-B and flipwon like this.
  3. flipwon

    flipwon

    Joined:
    Dec 29, 2016
    Posts:
    179
    Hrm, this sounds like it's going to blow up my project.

    edit: I stand corrected. It was literally that easy. Thanks.
     
    Last edited: Jun 24, 2020
  4. projectorgames_unity

    projectorgames_unity

    Joined:
    Oct 15, 2018
    Posts:
    107
    How does that work? did you remove the original package? I just get 'class already exists' type messages when I try this.
     
  5. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,188
    I'll use textmeshpro as an example. The version I have in the main package folder is
    com.unity.textmeshpro@2.0.1

    If I want to make changes to those files, I would copy this folder into the project package folder and edit it to be
    com.unity.textmeshpro

    Then start the project up and textmeshpro now points to the local project package and not the central one. If you are getting duplicate errors, you need to see if you have duplicates inside your assets folder of something. You should not get conflicts from the local and central packages.
     
    Invertex likes this.