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.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

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,744
    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:
    463
    sandolkakos and laurentlavigne like this.
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,744
    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:
    463
    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