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.

Question How to patch a package?

Discussion in 'Editor Workflows' started by mishakozlov74, Apr 27, 2022.

  1. mishakozlov74

    mishakozlov74

    Joined:
    Aug 8, 2018
    Posts:
    123
    There are some packages that Unity has abandoned, like GraphTools Foundation Package for example.
    It's not compatible with actual Unity versions, but is easy to fix.

    The question is, what's the proper way to fix it? Because I can't just fix it in dependencies - Editor will revert my changes and there is no way to store this changes.

    I can think of posting fixed version on github, but I think I'll broke license agreement doing that.

    Thanks.
     
  2. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    8,792
    You can move the package source code from the
    /Library
    folder into the
    /Packages
    folder. It becomes embedded package. Your source changes will stay, in exchange, updates only possible manually.
    Yeah, don't do that, it is not allowed.
     
    mishakozlov74 likes this.
  3. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,023
    An alternative approach to moving it to the package manager is to move it to an internally tracked repository, host that repo, and reference it from there.

    It's a lot more work than just copying it over to Packages/, but if you want your package to still have dependencies and versioning, it'll give you that. Verdaccio is what we use for that.
     
    mishakozlov74 likes this.