-1

I want to Change some Parts in Text mesh Pro in Unity And Use Some Function from Text Mesh Pro in another Script. Like the Private Function when I Change it to Public it Revert Back to private and do not let me change it. Is there Any Way to do it. Thanks.

derHugo
  • 83,094
  • 9
  • 75
  • 115
Rahmat Ali
  • 13
  • 8

1 Answers1

0

Packages installed via the PackageManager / manifest.json via UPM or Git (ones that are not on the local disk) get istalled into the Library/PackageCache.

They are read-only since the PackageManager will always restore them to the requested state (version) pulled from UPM.

Any change is immediately restored to the state from the cache and the cache itself is restored to whatever the official UPM state is.


In order to be able to modify a package you have to convert it eiher into an Embedded Package specifically by Copying a Unity package from the cache:

The most reliable way to find your package’s folder in the cache is to locate the installed version directly in the Unity Editor:

  1. Open the Project window by opening the Window menu and selecting General > Project.

  2. From the Project window, find the installed package you want to embed.

  3. Right-click the folder of the selected package and select Show in Explorer (Windows) or Reveal in Finder (macOS). That package’s folder opens directly in a file browser and uses the <package-name>@<package-version> naming convention.

    Note: If the package you want to embed isn’t in your project, you can get it directly from your project’s package cache (<project>/Library/PackageCache) by using your file browser or command line and navigating to the correct folder. However, it’s more reliable to let the Editor find it for you, because in addition to locating packages in the project cache, it also locates packages that are installed from a local folder or tarball, and packages that are already embedded.

    File browser opened to the package folder under the project’s
package cache

  4. Copy the package folder and paste it directly into your project’s Packages folder. Don’t put it inside the Assets folder, because the Package Manager does not scan that folder for packages.

  5. Remove the @<package-version> portion of the folder name.

  6. Add the newly embedded package to source control if your project is already under source control.

or the alternative would be to go for a Local Package which can be anywhere on your local disk. Basically doing the same as above but not copying into your project's Packages folder but anywhere else and then referencing accordingly via the PackageManager or the manifest.json


Have in mind to comply with the Licenses and legal notes when modifying and pushing packages public anywhere!

derHugo
  • 83,094
  • 9
  • 75
  • 115