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 do you change a script in a unity package?

Discussion in 'Package Manager' started by laurentlavigne, Jan 5, 2021.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,415
    I'm trying to fix vfxgraph not working with input system
    and each time I modify the c# it gets returned to original state.
    upload_2021-1-4_20-0-18.png
    all i want is to nuke this #if
    upload_2021-1-4_20-0-37.png
     
  2. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    459
    sandolkakos and laurentlavigne like this.
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,415
    thanks Favo,

    How do you do #1?

    I did #2 and it crashed the editor a few times, I think there are some deep dependencies in some of the packages, QA is aware, fixes coming in URP 8.32
     
    Last edited: Jan 5, 2021
  4. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    459
    1) Use API UnityEditor.PackageManager.Client.Embed(packageName);

    2) Or use this helper package, notice that the package will be renamed recently. It adds a menu item "Assets/Embed Package" against your current package selection.

    3) Or DIY. remove the direct dependency from your manifest.json (if have), move the package folder from Library/PackageCache/PKG_NAME to Packages/PKG_NAME
     
unityunity