- Home /
How to override package source code
In my Library folder I have 2 code files I need to change to fix 2 bugs but every time I restart Unity my fixes are gone. How do I make my fixes permanent? Is there a way to override the package source code from a script in my assets folder?
Answer by _geo__ · Dec 28, 2021 at 08:53 AM
You can copy the whole package into the "Packages" folder to make it an "embedded" package. This will then be used instead of the one listed in your manifest.
.
If you do this you will be resposible for manually updating it but it will persist across recompiles.
.
It's documented here: https://docs.unity3d.com/Manual/upm-ui-local.html#PkgLocation and here https://docs.unity3d.com/Manual/upm-concepts.html#Embedded
.
Once installed in a project, Unity treats package assets just like any other asset in the project, except that these assets are stored inside the package folder and are immutable. You can only permanently change content from Local and Embedded package sources.
Your answer
