how do you change a script in a unity package?

I’m trying to fix vfxgraph not working with input system
and each time I modify the c# it gets returned to original state.


all i want is to nuke this #if
6688435--767029--upload_2021-1-4_20-0-37.png

That package is immutable. Your choices are:

  1. Emb (eject) that package to your local Packages folder and modify it.

  2. add ENABLE_LEGACY_INPUT_MANAGER to the “Scripting Define Symbols” of Player settings.

search text “Platform custom #defines

2 Likes

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

  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

4 Likes